flozi00 commited on
Commit
7770adb
·
1 Parent(s): 7226ea6

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -1
app.py CHANGED
@@ -7,8 +7,12 @@ decoder = BeamSearchDecoderCTC.load_from_hf_hub(lmID)
7
  p = pipeline("automatic-speech-recognition", model="aware-ai/robust-wav2vec2-xls-r-300m-german-lowercase", decoder=decoder)
8
  ttp = pipeline("text2text-generation", model="aware-ai/marian-german-grammar")
9
 
 
 
 
 
10
  def transcribe(audio):
11
- transcribed = p(audio, chunk_length_s=16, stride_length_s=(4, 0))["text"]
12
 
13
  return transcribed
14
 
 
7
  p = pipeline("automatic-speech-recognition", model="aware-ai/robust-wav2vec2-xls-r-300m-german-lowercase", decoder=decoder)
8
  ttp = pipeline("text2text-generation", model="aware-ai/marian-german-grammar")
9
 
10
+ hotwords = [
11
+ "hilfe"
12
+ ]
13
+
14
  def transcribe(audio):
15
+ transcribed = p(audio, chunk_length_s=16, stride_length_s=(4, 0), hotwords = hotwords)["text"]
16
 
17
  return transcribed
18