This commit is contained in:
yumoqing 2024-08-10 17:01:01 +08:00
parent 8d70da92ca
commit 7e30812a09

View File

@ -49,14 +49,15 @@ async def generate(request, kw):
dic = await engine.stt(fname)
t2 = time.time()
os.remove(fname)
info(f'{dic=}')
return {
ret = {
"status":"ok",
"time_cost":t2-t1,
"content":dic['text'],
"segments":dic['segments'],
"language":dic['language']
}
info(f'{dic=}, {ret=}')
return ret
except Exception as e:
exception(f'{e}')
print_exc()