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 aiohttp.web import StreamResponse
|
||||
|
||||
@ -12,6 +13,7 @@ async def generate(request, **kw):
|
||||
line = await request.content.readline()
|
||||
content = ''
|
||||
while line:
|
||||
info(f'read from request stream {line=}')
|
||||
txt = await engine.stt(line)
|
||||
content += txt
|
||||
d = json.dumps({'content':content})
|
||||
@ -19,6 +21,7 @@ async def generate(request, **kw):
|
||||
await resp.write(btxt)
|
||||
await resp.drain()
|
||||
line = await request.content.readline()
|
||||
info('response finish')
|
||||
return resp
|
||||
|
||||
rf = RegisterFunction()
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"logger":{
|
||||
"name":"sage",
|
||||
"name":"asr",
|
||||
"levelname":"info",
|
||||
"logfile":"$[workdir]$/logs/sage.log"
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user