Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -34,13 +34,15 @@ def transcribe_base(audio, language):
|
|
34 |
speaker_class_string = f'New speaker detected. Assigned new ID {speaker}'
|
35 |
else:
|
36 |
speaker_class_string = f'Speaker found in database, ID {speaker}'
|
37 |
-
return transcription
|
38 |
|
39 |
def transcribe_mic(audio_microphone, language):
|
40 |
print("Transcription microphone")
|
41 |
transcription = transcribe_base(audio_microphone, language)
|
|
|
|
|
42 |
return transcription["transcription"]
|
43 |
-
return transcribe_base(audio_microphone, language)
|
44 |
|
45 |
def transcribe_file(audio_upload, language):
|
46 |
print("Transcription local file")
|
|
|
34 |
speaker_class_string = f'New speaker detected. Assigned new ID {speaker}'
|
35 |
else:
|
36 |
speaker_class_string = f'Speaker found in database, ID {speaker}'
|
37 |
+
return transcription#, speaker_class_string
|
38 |
|
39 |
def transcribe_mic(audio_microphone, language):
|
40 |
print("Transcription microphone")
|
41 |
transcription = transcribe_base(audio_microphone, language)
|
42 |
+
if language=="it":
|
43 |
+
transcription=re.sub(r"\b([ldvc]) ([aeiouáéíóúàèìòù])", r"\1'\2", transcription)
|
44 |
return transcription["transcription"]
|
45 |
+
#return transcribe_base(audio_microphone, language)
|
46 |
|
47 |
def transcribe_file(audio_upload, language):
|
48 |
print("Transcription local file")
|