flozi00 commited on
Commit
18e36a8
·
1 Parent(s): 4b202da

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -7,9 +7,9 @@ ttp = pipeline("text2text-generation", model="aware-ai/marian-german-grammar")
7
 
8
  def transcribe(audio):
9
  transcribed = p(audio, chunk_length_s=10, stride_length_s=(4, 2))["text"].lower()
10
- transcribed = ttp(re.sub("[^a-zA-Z0-9öäüÖÄÜ ]", " ",transcribed))[0]["generated_text"]
11
 
12
- return transcribed
13
 
14
  gr.Interface(
15
  fn=transcribe,
 
7
 
8
  def transcribe(audio):
9
  transcribed = p(audio, chunk_length_s=10, stride_length_s=(4, 2))["text"].lower()
10
+ transcribed_corrected = ttp(re.sub("[^a-zA-Z0-9öäüÖÄÜ ]", " ",transcribed))[0]["generated_text"]
11
 
12
+ return transcribed + "\n" + transcribed_corrected
13
 
14
  gr.Interface(
15
  fn=transcribe,