on1onmangoes commited on
Commit
9324d2a
1 Parent(s): d23a170

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +16 -7
app.py CHANGED
@@ -32,9 +32,18 @@ def transcribe(audio_path, task="transcribe", group_by_speaker=True, progress=gr
32
  print(diarization)
33
  #segments = diarization.for_json()["content"]
34
  #segments = str(diarization)
35
- transcription = "this is a test"
36
  return transcription
37
 
 
 
 
 
 
 
 
 
 
38
  audio_file = gr.Interface(
39
  fn=transcribe,
40
  inputs=[
@@ -43,12 +52,12 @@ audio_file = gr.Interface(
43
  gr.inputs.Checkbox(default=True, label="Group by speaker"),
44
  ],
45
  outputs=[
46
- gr.outputs.Textbox(label="Transcription")
47
- ]
48
- # allow_flagging="never",
49
- # title=title,
50
- # description=description,
51
- # article=article,
52
  )
53
 
54
  demo = gr.Blocks()
 
32
  print(diarization)
33
  #segments = diarization.for_json()["content"]
34
  #segments = str(diarization)
35
+ transcription = "SAML Output"
36
  return transcription
37
 
38
+ title = "SAML Speaker Diarization ⚡️"
39
+
40
+ description = """Combine the speed of Whisper JAX with pyannote speaker diarization to transcribe meetings in super fast time. Demo uses Whisper JAX as an [endpoint](https://twitter.com/sanchitgandhi99/status/1656665496463495168) and pyannote speaker diarization running locally. The Whisper JAX endpoint is run asynchronously, meaning speaker diarization is run in parallel to the speech transcription. The diarized timestamps are aligned with the Whisper output to give the final speaker-segmented transcription.
41
+ To duplicate the demo, first accept the pyannote terms of use for the [speaker diarization](https://huggingface.co/pyannote/speaker-diarization) and [segmentation](https://huggingface.co/pyannote/segmentation) models. Then, click [here](https://huggingface.co/spaces/sanchit-gandhi/whisper-jax-diarization?duplicate=true) to duplicate the demo, and enter your Hugging Face access token as a Space secret when prompted.
42
+ """
43
+
44
+ article = "Whisper large-v2 model by OpenAI. Speaker diarization model by pyannote. Whisper JAX backend running JAX on a TPU v4-8 through the generous support of the [TRC](https://sites.research.google/trc/about/) programme. Whisper JAX [code](https://github.com/sanchit-gandhi/whisper-jax) and Gradio demo by 🤗 Hugging Face."
45
+
46
+
47
  audio_file = gr.Interface(
48
  fn=transcribe,
49
  inputs=[
 
52
  gr.inputs.Checkbox(default=True, label="Group by speaker"),
53
  ],
54
  outputs=[
55
+ gr.outputs.Textbox(label="Transcription").style(show_copy_button=True)
56
+ ],
57
+ allow_flagging="never",
58
+ title=title,
59
+ description=description,
60
+ article=article,
61
  )
62
 
63
  demo = gr.Blocks()