mirror of
https://github.com/SevaSk/ecoute.git
synced 2024-12-18 20:27:56 +00:00
catching exceptions when making temp_file
This commit is contained in:
parent
b95b162f5a
commit
811c111b2d
@ -47,7 +47,11 @@ class AudioTranscriber:
|
||||
source_info = self.audio_sources[who_spoke]
|
||||
|
||||
text = ''
|
||||
temp_file = NamedTemporaryFile(delete=False, suffix=".wav")
|
||||
try:
|
||||
temp_file = NamedTemporaryFile(delete=False, suffix=".wav")
|
||||
except Exception as e:
|
||||
print(e)
|
||||
|
||||
temp_file.close()
|
||||
|
||||
source_info["process_data_func"](source_info["last_sample"], temp_file.name)
|
||||
|
Loading…
Reference in New Issue
Block a user