add more worker
This commit is contained in:
parent
6aec5226ba
commit
cb45e37b68
2 changed files with 4 additions and 1 deletions
|
@ -14,6 +14,7 @@ services:
|
|||
- cache-pip:/root/.cache/pip
|
||||
- cache-poetry:/root/.cache/poetry
|
||||
- cache-whisper:/root/.cache/whisper
|
||||
entrypoint: ["gunicorn", "--bind", "0.0.0.0:9000", "--workers", "10", "--timeout", "0", "app.webservice:app", "-k", "uvicorn.workers.UvicornWorker"]
|
||||
|
||||
volumes:
|
||||
cache-pip:
|
||||
|
|
|
@ -17,12 +17,14 @@ def audio_callback_closure(client: AsyncClient):
|
|||
# file.write(audio.body)
|
||||
print("Transcribe audio")
|
||||
response = requests.post('http://127.0.0.1:9000/asr?encode=true&task=transcribe&word_timestamps=false&output=txt', files=files)
|
||||
print("Finished transcribing")
|
||||
room_id = room.room_id
|
||||
await client.room_send(
|
||||
sent_message = await client.room_send(
|
||||
room_id=room_id,
|
||||
message_type="m.room.message",
|
||||
content={"msgtype": "m.text", "body": response.content.decode()},
|
||||
)
|
||||
print(sent_message)
|
||||
return audio_callback
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue