# GRYANNOTE-AUDIO: AUDIO LABELING GRADIO COMPONENT
## Installation
```shell
pip install gryannote-audio
```
## Component usage example
```python
import gradio as gr
from gryannote_audio import AnnotatedAudio
from pyannote.audio import Pipeline
annotated_audio = AnnotatedAudio(type="filepath", interactive=True)
def apply_pipeline(audio):
pipeline = Pipeline.from_pretrained("pyannote/speaker-diarization-3.1")
annotations = pipeline(audio)
return (audio, annotations)
demo = gr.Interface(apply_pipeline, inputs=annotated_audio, outputs=annotated_audio)
demo.launch()
```
## Keyboard shortcuts
The following table summarizes available keyboard shortcuts for the `AnnotatedAudio` component:
| Shortcut | Action |
| --------------------------------------------- | --------------------------------------------------------------------- |
| `SPACE` | Toggle play / pause |
| `ENTER` | Create annotation at current time |
| `SHIFT + ENTER` | Split annotation at current time |
| `A`, `B`, `C`, ..., `Z` | Set active label. If there is a selected annotation, update its label |
| `LEFT` or `RIGHT` | Edit start time of selected annotation (if any) or move time cursor |
| `SHIFT + LEFT` or `SHIFT + RIGHT` | Same, but faster |
|`ALT + LEFT` or `ALT + RIGHT` | Edit end time of selected annotation |
| `SHIFT + ALT + LEFT` or `SHIFT + ALT + RIGHT` | Same, but faster |
| `TAB` | Select next annotation |
| `SHIFT + TAB` | Select previous annotation |
|`BACKSAPCE` | Delete selected annotation and select the previous one |
|`DELETE` or `SHIFT + BACKSPACE` | Delete selected region and select the next one |
|`ESC` | Unselect selected annotation and / or label |
| `UP` or `DOWN` | Zoom in/out |
Raw data
{
"_id": null,
"home_page": null,
"name": "gryannote-audio",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.8",
"maintainer_email": null,
"keywords": "gradio-custom-component, gradio-template-Audio, pyannote.audio, speaker diarization",
"author": null,
"author_email": "Cl\u00e9ment Pag\u00e9s <clement.pages@irit.fr>",
"download_url": "https://files.pythonhosted.org/packages/b6/15/93453c30a45c2313c943b594113fdb0cdd92a9b2863adb7e2b895e9ea799/gryannote_audio-0.1.5.tar.gz",
"platform": null,
"description": "# GRYANNOTE-AUDIO: AUDIO LABELING GRADIO COMPONENT\n\n## Installation\n\n```shell\npip install gryannote-audio\n```\n\n## Component usage example\n\n```python\nimport gradio as gr\nfrom gryannote_audio import AnnotatedAudio\nfrom pyannote.audio import Pipeline\n\nannotated_audio = AnnotatedAudio(type=\"filepath\", interactive=True)\n\n\ndef apply_pipeline(audio):\n pipeline = Pipeline.from_pretrained(\"pyannote/speaker-diarization-3.1\")\n annotations = pipeline(audio)\n return (audio, annotations)\n\ndemo = gr.Interface(apply_pipeline, inputs=annotated_audio, outputs=annotated_audio)\n\ndemo.launch()\n```\n\n\n\n## Keyboard shortcuts\n\nThe following table summarizes available keyboard shortcuts for the `AnnotatedAudio` component:\n\n| Shortcut | Action |\n| --------------------------------------------- | --------------------------------------------------------------------- |\n| `SPACE` | Toggle play / pause |\n| `ENTER` | Create annotation at current time |\n| `SHIFT + ENTER` | Split annotation at current time |\n| `A`, `B`, `C`, ..., `Z` | Set active label. If there is a selected annotation, update its label |\n| `LEFT` or `RIGHT` | Edit start time of selected annotation (if any) or move time cursor |\n| `SHIFT + LEFT` or `SHIFT + RIGHT` | Same, but faster |\n|`ALT + LEFT` or `ALT + RIGHT` | Edit end time of selected annotation |\n| `SHIFT + ALT + LEFT` or `SHIFT + ALT + RIGHT` | Same, but faster |\n| `TAB` | Select next annotation |\n| `SHIFT + TAB` | Select previous annotation |\n|`BACKSAPCE` | Delete selected annotation and select the previous one |\n|`DELETE` or `SHIFT + BACKSPACE` | Delete selected region and select the next one |\n|`ESC` | Unselect selected annotation and / or label |\n| `UP` or `DOWN` | Zoom in/out |\n",
"bugtrack_url": null,
"license": null,
"summary": "audio component with speaker annotations",
"version": "0.1.5",
"project_urls": null,
"split_keywords": [
"gradio-custom-component",
" gradio-template-audio",
" pyannote.audio",
" speaker diarization"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "ef66289408fc4cf4a826b3b51a7eeff0320eb9e98029d6e400f941aa99f0a5db",
"md5": "d4fe8f66f804685b996d76039ac32815",
"sha256": "9c72ebd51715051f5f56bd34a4029753a9ac2d3c83863ccf1f32964a60820fe9"
},
"downloads": -1,
"filename": "gryannote_audio-0.1.5-py3-none-any.whl",
"has_sig": false,
"md5_digest": "d4fe8f66f804685b996d76039ac32815",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.8",
"size": 172447,
"upload_time": "2024-04-24T13:41:34",
"upload_time_iso_8601": "2024-04-24T13:41:34.548753Z",
"url": "https://files.pythonhosted.org/packages/ef/66/289408fc4cf4a826b3b51a7eeff0320eb9e98029d6e400f941aa99f0a5db/gryannote_audio-0.1.5-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "b61593453c30a45c2313c943b594113fdb0cdd92a9b2863adb7e2b895e9ea799",
"md5": "520d370099e1d856f7c40bad5507a1d6",
"sha256": "9cdc25b6480e9a22e261e294a628bf9c8b31143578dd78f5b59e0084d290d805"
},
"downloads": -1,
"filename": "gryannote_audio-0.1.5.tar.gz",
"has_sig": false,
"md5_digest": "520d370099e1d856f7c40bad5507a1d6",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.8",
"size": 195347,
"upload_time": "2024-04-24T13:41:36",
"upload_time_iso_8601": "2024-04-24T13:41:36.211820Z",
"url": "https://files.pythonhosted.org/packages/b6/15/93453c30a45c2313c943b594113fdb0cdd92a9b2863adb7e2b895e9ea799/gryannote_audio-0.1.5.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-04-24 13:41:36",
"github": false,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"lcname": "gryannote-audio"
}