KingNish commited on
Commit
f696e7e
·
verified ·
1 Parent(s): bffc431

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -7,13 +7,13 @@ import tempfile
7
  import os
8
 
9
  MODEL_NAME = "ylacombe/whisper-large-v3-turbo"
10
- BATCH_SIZE = 1
11
  device = 0 if torch.cuda.is_available() else "cpu"
12
 
13
  pipe = pipeline(
14
  task="automatic-speech-recognition",
15
  model=MODEL_NAME,
16
- chunk_length_s=1,
17
  device=device,
18
  )
19
 
@@ -27,6 +27,6 @@ with gr.Blocks() as demo:
27
  input_audio_microphone = gr.Audio(streaming=True)
28
  output = gr.Textbox(label="Transcription", value="")
29
 
30
- input_audio_microphone.stream(transcribe, [input_audio_microphone, output], [output], time_limit=15, stream_every=1, concurrency_limit=None)
31
 
32
  demo.queue().launch()
 
7
  import os
8
 
9
  MODEL_NAME = "ylacombe/whisper-large-v3-turbo"
10
+ BATCH_SIZE = 8
11
  device = 0 if torch.cuda.is_available() else "cpu"
12
 
13
  pipe = pipeline(
14
  task="automatic-speech-recognition",
15
  model=MODEL_NAME,
16
+ chunk_length_s=30,
17
  device=device,
18
  )
19
 
 
27
  input_audio_microphone = gr.Audio(streaming=True)
28
  output = gr.Textbox(label="Transcription", value="")
29
 
30
+ input_audio_microphone.stream(transcribe, [input_audio_microphone, output], [output], time_limit=45, stream_every=2, concurrency_limit=None)
31
 
32
  demo.queue().launch()