bugfix
This commit is contained in:
parent
8d70da92ca
commit
7e30812a09
@ -49,14 +49,15 @@ async def generate(request, kw):
|
|||||||
dic = await engine.stt(fname)
|
dic = await engine.stt(fname)
|
||||||
t2 = time.time()
|
t2 = time.time()
|
||||||
os.remove(fname)
|
os.remove(fname)
|
||||||
info(f'{dic=}')
|
ret = {
|
||||||
return {
|
|
||||||
"status":"ok",
|
"status":"ok",
|
||||||
"time_cost":t2-t1,
|
"time_cost":t2-t1,
|
||||||
"content":dic['text'],
|
"content":dic['text'],
|
||||||
"segments":dic['segments'],
|
"segments":dic['segments'],
|
||||||
"language":dic['language']
|
"language":dic['language']
|
||||||
}
|
}
|
||||||
|
info(f'{dic=}, {ret=}')
|
||||||
|
return ret
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
exception(f'{e}')
|
exception(f'{e}')
|
||||||
print_exc()
|
print_exc()
|
||||||
|
Loading…
Reference in New Issue
Block a user