patharanor commited on
Commit
80c704e
·
1 Parent(s): 0aabefd

set language and batch size

Browse files
Files changed (1) hide show
  1. app.py +6 -1
app.py CHANGED
@@ -18,7 +18,12 @@ def transcribe(audio):
18
  y = y.astype(np.float32)
19
  y /= np.max(np.abs(y))
20
 
21
- return transcriber({"sampling_rate": sr, "raw": y})["text"]
 
 
 
 
 
22
 
23
 
24
  demo = gr.Interface(
 
18
  y = y.astype(np.float32)
19
  y /= np.max(np.abs(y))
20
 
21
+ return transcriber(
22
+ {"sampling_rate": sr, "raw": y},
23
+ generate_kwargs={"language":"<|th|>", "task":"transcribe"},
24
+ return_timestamps=False,
25
+ batch_size=16
26
+ )["text"]
27
 
28
 
29
  demo = gr.Interface(