bugfix
This commit is contained in:
parent
f8dc17f12f
commit
8603274074
@ -1,3 +1,4 @@
|
|||||||
|
from appPublic.log import info, debug, warning, error, exception, critical
|
||||||
from ahserver.serverenv import ServerEnv
|
from ahserver.serverenv import ServerEnv
|
||||||
from aiohttp.web import StreamResponse
|
from aiohttp.web import StreamResponse
|
||||||
|
|
||||||
@ -12,6 +13,7 @@ async def generate(request, **kw):
|
|||||||
line = await request.content.readline()
|
line = await request.content.readline()
|
||||||
content = ''
|
content = ''
|
||||||
while line:
|
while line:
|
||||||
|
info(f'read from request stream {line=}')
|
||||||
txt = await engine.stt(line)
|
txt = await engine.stt(line)
|
||||||
content += txt
|
content += txt
|
||||||
d = json.dumps({'content':content})
|
d = json.dumps({'content':content})
|
||||||
@ -19,6 +21,7 @@ async def generate(request, **kw):
|
|||||||
await resp.write(btxt)
|
await resp.write(btxt)
|
||||||
await resp.drain()
|
await resp.drain()
|
||||||
line = await request.content.readline()
|
line = await request.content.readline()
|
||||||
|
info('response finish')
|
||||||
return resp
|
return resp
|
||||||
|
|
||||||
rf = RegisterFunction()
|
rf = RegisterFunction()
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"logger":{
|
"logger":{
|
||||||
"name":"sage",
|
"name":"asr",
|
||||||
"levelname":"info",
|
"levelname":"info",
|
||||||
"logfile":"$[workdir]$/logs/sage.log"
|
"logfile":"$[workdir]$/logs/sage.log"
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user