@labelu/audio-react
v1.3.5
Published
labelu audio annotation component for react
Downloads
609
Readme
@labelu/audio-react
安装
npm install @labelu/audio-react
使用
import React from 'react';
import Audio from '@labelu/audio-react';
function App() {
const [annotations, setAnnotations] = useState([]);
return (
<AudioAnnotator
editingLabel="abc"
src="https://exmaple/audio.mp3"
editingType="segment"
annotations={annotations}
toolConfig={{
segment: [
{
type: 'segment',
attributes: [
{
color: '#ff0000',
type: 'string',
key: 'label',
value: 'abc',
},
],
},
],
}}
onChange={setAnnotations}
/>
);
}