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}
/>
);
}