mirror of
https://github.com/BoardWare-Genius/jarvis-models.git
synced 2025-12-13 16:53:24 +00:00
fix: asr
This commit is contained in:
@ -85,7 +85,7 @@ class ASR(Blackbox):
|
|||||||
print(f"asr_model_name: {user_model_name}")
|
print(f"asr_model_name: {user_model_name}")
|
||||||
data = args[0]
|
data = args[0]
|
||||||
|
|
||||||
if user_model_name == 'sensevoice' or ['sensevoice']:
|
if 'sensevoice' in user_model_name:
|
||||||
with tempfile.NamedTemporaryFile(delete=False, suffix=".wav") as temp_audio_file:
|
with tempfile.NamedTemporaryFile(delete=False, suffix=".wav") as temp_audio_file:
|
||||||
temp_audio_file.write(data)
|
temp_audio_file.write(data)
|
||||||
temp_audio_path = temp_audio_file.name
|
temp_audio_path = temp_audio_file.name
|
||||||
@ -106,8 +106,7 @@ class ASR(Blackbox):
|
|||||||
results = converter.convert(results)
|
results = converter.convert(results)
|
||||||
return results
|
return results
|
||||||
|
|
||||||
elif user_model_name == 'funasr' or ['funasr']:
|
elif 'funasr' in user_model_name:
|
||||||
|
|
||||||
results = converter.convert(results)
|
results = converter.convert(results)
|
||||||
return results
|
return results
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user