clement-pages commited on
Commit
074b1c4
·
1 Parent(s): dee1de4

rename component

Browse files
Files changed (29) hide show
  1. app.py +2 -2
  2. {sourceviewer → pyannote_viewer}/.gitignore +0 -0
  3. {sourceviewer → pyannote_viewer}/README.md +0 -0
  4. pyannote_viewer/backend/pyannote_viewer/__init__.py +4 -0
  5. sourceviewer/backend/gradio_sourceviewer/sourceviewer.py → pyannote_viewer/backend/pyannote_viewer/pyannote_viewer.py +5 -4
  6. {sourceviewer → pyannote_viewer}/demo/app.py +3 -3
  7. {sourceviewer → pyannote_viewer}/frontend/Example.svelte +0 -0
  8. {sourceviewer → pyannote_viewer}/frontend/Index.svelte +0 -0
  9. {sourceviewer → pyannote_viewer}/frontend/index.ts +0 -0
  10. {sourceviewer → pyannote_viewer}/frontend/interactive/InteractiveAudio.svelte +0 -0
  11. {sourceviewer → pyannote_viewer}/frontend/package-lock.json +3 -3
  12. {sourceviewer → pyannote_viewer}/frontend/package.json +2 -2
  13. {sourceviewer → pyannote_viewer}/frontend/player/AudioPlayer.svelte +0 -0
  14. {sourceviewer → pyannote_viewer}/frontend/recorder/AudioRecorder.svelte +0 -0
  15. {sourceviewer → pyannote_viewer}/frontend/shared/Audio.svelte +0 -0
  16. {sourceviewer → pyannote_viewer}/frontend/shared/DeviceSelect.svelte +0 -0
  17. {sourceviewer → pyannote_viewer}/frontend/shared/VolumeControl.svelte +0 -0
  18. {sourceviewer → pyannote_viewer}/frontend/shared/VolumeLevels.svelte +0 -0
  19. {sourceviewer → pyannote_viewer}/frontend/shared/WaveformControls.svelte +0 -0
  20. {sourceviewer → pyannote_viewer}/frontend/shared/WaveformRecordControls.svelte +0 -0
  21. {sourceviewer → pyannote_viewer}/frontend/shared/audioBufferToWav.ts +0 -0
  22. {sourceviewer → pyannote_viewer}/frontend/shared/index.ts +0 -0
  23. {sourceviewer → pyannote_viewer}/frontend/shared/types.ts +0 -0
  24. {sourceviewer → pyannote_viewer}/frontend/shared/utils.ts +0 -0
  25. {sourceviewer → pyannote_viewer}/frontend/static/StaticAudio.svelte +0 -0
  26. {sourceviewer → pyannote_viewer}/frontend/streaming/StreamAudio.svelte +0 -0
  27. {sourceviewer → pyannote_viewer}/pyproject.toml +11 -8
  28. sourceviewer/backend/gradio_sourceviewer/__init__.py +0 -4
  29. sourceviewer/demo/__init__.py +0 -0
app.py CHANGED
@@ -1,5 +1,5 @@
1
  import gradio as gr
2
- from gradio_sourceviewer import SourceViewer
3
  from pyannote.audio import Pipeline
4
  import os
5
 
@@ -33,7 +33,7 @@ with gr.Blocks() as demo:
33
 
34
  audio = gr.Audio(type="filepath")
35
  btn = gr.Button("Apply separation pipeline")
36
- source_viewer = SourceViewer(interactive=False)
37
 
38
  btn.click(fn=apply_pipeline, inputs=[audio], outputs=[source_viewer])
39
 
 
1
  import gradio as gr
2
+ from pyannote_viewer import PyannoteViewer
3
  from pyannote.audio import Pipeline
4
  import os
5
 
 
33
 
34
  audio = gr.Audio(type="filepath")
35
  btn = gr.Button("Apply separation pipeline")
36
+ source_viewer = PyannoteViewer(interactive=False)
37
 
38
  btn.click(fn=apply_pipeline, inputs=[audio], outputs=[source_viewer])
39
 
{sourceviewer → pyannote_viewer}/.gitignore RENAMED
File without changes
{sourceviewer → pyannote_viewer}/README.md RENAMED
File without changes
pyannote_viewer/backend/pyannote_viewer/__init__.py ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+
2
+ from .pyannote_viewer import PyannoteViewer
3
+
4
+ __all__ = ['PyannoteViewer']
sourceviewer/backend/gradio_sourceviewer/sourceviewer.py → pyannote_viewer/backend/pyannote_viewer/pyannote_viewer.py RENAMED
@@ -51,15 +51,16 @@ class Segment:
51
  channel: int
52
 
53
 
54
- class SourceViewer(
55
  StreamingInput,
56
  StreamingOutput,
57
  Component,
58
  ):
59
  """
60
- Creates an audio component that can be used to upload/record audio (as an input) or display audio (as an output).
61
- Demos: generate_tone, reverse_audio
62
- Guides: real-time-speech-recognition
 
63
  """
64
 
65
  EVENTS = [
 
51
  channel: int
52
 
53
 
54
+ class PyannoteViewer(
55
  StreamingInput,
56
  StreamingOutput,
57
  Component,
58
  ):
59
  """
60
+ Creates an audio component that can be used to visualize pyannote's pipelines outputs.
61
+ Can only be used as an output component.
62
+
63
+ See https://github.com/pyannote/pyannote-audio for more informations about pyannote
64
  """
65
 
66
  EVENTS = [
{sourceviewer → pyannote_viewer}/demo/app.py RENAMED
@@ -1,5 +1,5 @@
1
  import gradio as gr
2
- from gradio_sourceviewer import SourceViewer
3
  from pyannote.audio import Pipeline
4
  import os
5
 
@@ -14,9 +14,9 @@ def apply_pipeline(audio: str) -> tuple:
14
  with gr.Blocks() as demo:
15
  audio = gr.Audio(type="filepath")
16
  btn = gr.Button("Apply separation pipeline")
17
- source_viewer = SourceViewer(interactive=False)
18
 
19
- btn.click(fn=apply_pipeline, inputs=[audio], outputs=[source_viewer])
20
 
21
 
22
  if __name__ == "__main__":
 
1
  import gradio as gr
2
+ from pyannote_viewer import PyannoteViewer
3
  from pyannote.audio import Pipeline
4
  import os
5
 
 
14
  with gr.Blocks() as demo:
15
  audio = gr.Audio(type="filepath")
16
  btn = gr.Button("Apply separation pipeline")
17
+ pyannote_viewer = PyannoteViewer(interactive=False)
18
 
19
+ btn.click(fn=apply_pipeline, inputs=[audio], outputs=[pyannote_viewer])
20
 
21
 
22
  if __name__ == "__main__":
{sourceviewer → pyannote_viewer}/frontend/Example.svelte RENAMED
File without changes
{sourceviewer → pyannote_viewer}/frontend/Index.svelte RENAMED
File without changes
{sourceviewer → pyannote_viewer}/frontend/index.ts RENAMED
File without changes
{sourceviewer → pyannote_viewer}/frontend/interactive/InteractiveAudio.svelte RENAMED
File without changes
{sourceviewer → pyannote_viewer}/frontend/package-lock.json RENAMED
@@ -1,13 +1,13 @@
1
  {
2
- "name": "gradio_sourceviewer",
3
  "version": "0.9.12",
4
  "lockfileVersion": 3,
5
  "requires": true,
6
  "packages": {
7
  "": {
8
- "name": "gradio_sourceviewer",
9
  "version": "0.9.12",
10
- "license": "ISC",
11
  "dependencies": {
12
  "@gradio/atoms": "0.7.0",
13
  "@gradio/button": "0.2.31",
 
1
  {
2
+ "name": "pyannote-viewer",
3
  "version": "0.9.12",
4
  "lockfileVersion": 3,
5
  "requires": true,
6
  "packages": {
7
  "": {
8
+ "name": "pyannote-viewer",
9
  "version": "0.9.12",
10
+ "license": "MIT",
11
  "dependencies": {
12
  "@gradio/atoms": "0.7.0",
13
  "@gradio/button": "0.2.31",
{sourceviewer → pyannote_viewer}/frontend/package.json RENAMED
@@ -1,10 +1,10 @@
1
  {
2
- "name": "gradio_sourceviewer",
3
  "version": "0.9.12",
4
  "description": "Gradio UI packages",
5
  "type": "module",
6
  "author": "",
7
- "license": "ISC",
8
  "private": false,
9
  "dependencies": {
10
  "@gradio/atoms": "0.7.0",
 
1
  {
2
+ "name": "pyannote-viewer",
3
  "version": "0.9.12",
4
  "description": "Gradio UI packages",
5
  "type": "module",
6
  "author": "",
7
+ "license": "MIT",
8
  "private": false,
9
  "dependencies": {
10
  "@gradio/atoms": "0.7.0",
{sourceviewer → pyannote_viewer}/frontend/player/AudioPlayer.svelte RENAMED
File without changes
{sourceviewer → pyannote_viewer}/frontend/recorder/AudioRecorder.svelte RENAMED
File without changes
{sourceviewer → pyannote_viewer}/frontend/shared/Audio.svelte RENAMED
File without changes
{sourceviewer → pyannote_viewer}/frontend/shared/DeviceSelect.svelte RENAMED
File without changes
{sourceviewer → pyannote_viewer}/frontend/shared/VolumeControl.svelte RENAMED
File without changes
{sourceviewer → pyannote_viewer}/frontend/shared/VolumeLevels.svelte RENAMED
File without changes
{sourceviewer → pyannote_viewer}/frontend/shared/WaveformControls.svelte RENAMED
File without changes
{sourceviewer → pyannote_viewer}/frontend/shared/WaveformRecordControls.svelte RENAMED
File without changes
{sourceviewer → pyannote_viewer}/frontend/shared/audioBufferToWav.ts RENAMED
File without changes
{sourceviewer → pyannote_viewer}/frontend/shared/index.ts RENAMED
File without changes
{sourceviewer → pyannote_viewer}/frontend/shared/types.ts RENAMED
File without changes
{sourceviewer → pyannote_viewer}/frontend/shared/utils.ts RENAMED
File without changes
{sourceviewer → pyannote_viewer}/frontend/static/StaticAudio.svelte RENAMED
File without changes
{sourceviewer → pyannote_viewer}/frontend/streaming/StreamAudio.svelte RENAMED
File without changes
{sourceviewer → pyannote_viewer}/pyproject.toml RENAMED
@@ -7,13 +7,13 @@ requires = [
7
  build-backend = "hatchling.build"
8
 
9
  [project]
10
- name = "gradio_sourceviewer"
11
  version = "1.0.0"
12
- description = "Python library for easily interacting with trained machine learning models"
13
  readme = "README.md"
14
- license = "Apache-2.0"
15
- requires-python = ">=3.8"
16
- authors = [{ name = "", email = "[email protected]" }]
17
  keywords = [
18
  "gradio-custom-component",
19
  "gradio-template-Audio",
@@ -21,6 +21,9 @@ keywords = [
21
  "speech-separation",
22
  "speaker-diarization",
23
  "source-separation",
 
 
 
24
  "pixit",
25
  "totatonet",
26
  ]
@@ -28,7 +31,7 @@ keywords = [
28
  dependencies = ["gradio>=4.0,<5.0"]
29
  classifiers = [
30
  'Development Status :: 3 - Alpha',
31
- 'License :: OSI Approved :: Apache Software License',
32
  'Operating System :: OS Independent',
33
  'Programming Language :: Python :: 3',
34
  'Programming Language :: Python :: 3 :: Only',
@@ -43,7 +46,7 @@ classifiers = [
43
  dev = ["build", "twine"]
44
 
45
  [tool.hatch.build]
46
- artifacts = ["/backend/gradio_sourceviewer/templates", "*.pyi", "backend/gradio_sourceviewer/templates"]
47
 
48
  [tool.hatch.build.targets.wheel]
49
- packages = ["/backend/gradio_sourceviewer"]
 
7
  build-backend = "hatchling.build"
8
 
9
  [project]
10
+ name = "pyannote_viewer"
11
  version = "1.0.0"
12
+ description = "Gradio custom component to visualize pyannote's pipelines outputs"
13
  readme = "README.md"
14
+ license = "MIT"
15
+ requires-python = ">=3.10"
16
+ authors = [{ name = "Clément Pagés", email = "[email protected]" }]
17
  keywords = [
18
  "gradio-custom-component",
19
  "gradio-template-Audio",
 
21
  "speech-separation",
22
  "speaker-diarization",
23
  "source-separation",
24
+ "speech",
25
+ "speaker",
26
+ "voice-activity-detection",
27
  "pixit",
28
  "totatonet",
29
  ]
 
31
  dependencies = ["gradio>=4.0,<5.0"]
32
  classifiers = [
33
  'Development Status :: 3 - Alpha',
34
+ 'License :: OSI Approved :: MIT License',
35
  'Operating System :: OS Independent',
36
  'Programming Language :: Python :: 3',
37
  'Programming Language :: Python :: 3 :: Only',
 
46
  dev = ["build", "twine"]
47
 
48
  [tool.hatch.build]
49
+ artifacts = ["/backend/pyannoteviewer/templates", "*.pyi",]
50
 
51
  [tool.hatch.build.targets.wheel]
52
+ packages = ["/backend/pyannote_viewer"]
sourceviewer/backend/gradio_sourceviewer/__init__.py DELETED
@@ -1,4 +0,0 @@
1
-
2
- from .sourceviewer import SourceViewer
3
-
4
- __all__ = ['SourceViewer']
 
 
 
 
 
sourceviewer/demo/__init__.py DELETED
File without changes