@labelu/audio-react
TypeScript icon, indicating that this package has built-in type declarations

1.3.5 • Public • Published

@labelu/audio-react

npm

安装

npm install @labelu/audio-react

使用

example

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

API

Documentation

Readme

Keywords

none

Package Sidebar

Install

npm i @labelu/audio-react

Weekly Downloads

86

Version

1.3.5

License

Apache-2.0

Unpacked Size

1.21 MB

Total Files

11

Last publish

Collaborators

  • garyshen