mirror of
https://github.com/FAUSheppy/ths-speech
synced 2025-12-08 19:58:33 +01:00
chain audio implemented
This commit is contained in:
@@ -9,7 +9,7 @@ def async_create_transcript(filename):
|
||||
|
||||
def create_and_save_transcript(filename):
|
||||
transcript = analyse(filename)
|
||||
filesystem.save_transcript(transcript)
|
||||
filesystem.save_transcript(filename, transcript)
|
||||
|
||||
def analyse(filename):
|
||||
''' returns the transcripted audio, or None if the analysis fails '''
|
||||
@@ -18,7 +18,7 @@ def analyse(filename):
|
||||
audio = recognizer.record(source)
|
||||
|
||||
try:
|
||||
string = recognizer.recognize_google(audio)
|
||||
string = recognizer.recognize_google(audio,language="de-DE")
|
||||
except spr.UnknownValueError:
|
||||
log.log("Audio file is broken or not an audio file")
|
||||
return None
|
||||
|
||||
Reference in New Issue
Block a user