GatinhoEducado commited on
Commit
cded203
1 Parent(s): 13f8a3e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -1
app.py CHANGED
@@ -13,6 +13,8 @@ asr_pipe = pipeline(
13
  "automatic-speech-recognition",
14
  model="GatinhoEducado/whisper-tiny-finetuned-minds14",
15
  device=device,
 
 
16
  tokenizer = tokenizer,
17
  generate_kwargs = {"language":"<|pt|>",
18
  "task": "transcribe",
@@ -32,7 +34,7 @@ speaker_embeddings = torch.tensor(embeddings_dataset[7306]["xvector"]).unsqueeze
32
 
33
  def translate(audio):
34
  #outputs = asr_pipe(audio, max_new_tokens=256, generate_kwargs={"task": "translate"})
35
- outputs = asr_pipe(audio, max_new_tokens=100)
36
  return outputs["text"]
37
 
38
 
 
13
  "automatic-speech-recognition",
14
  model="GatinhoEducado/whisper-tiny-finetuned-minds14",
15
  device=device,
16
+ max_new_tokens=60,
17
+ chunk_length_s=0,
18
  tokenizer = tokenizer,
19
  generate_kwargs = {"language":"<|pt|>",
20
  "task": "transcribe",
 
34
 
35
  def translate(audio):
36
  #outputs = asr_pipe(audio, max_new_tokens=256, generate_kwargs={"task": "translate"})
37
+ outputs = asr_pipe(audio, max_new_tokens=256)
38
  return outputs["text"]
39
 
40