add OMP_NUM_THREADS

This commit is contained in:
Moritz 2024-08-14 10:25:57 +02:00
parent cb45e37b68
commit 9f7b08e278
2 changed files with 3 additions and 3 deletions

View File

@ -7,6 +7,7 @@ services:
- ASR_MODEL=large-v3 - ASR_MODEL=large-v3
#- ASR_ENGINE=openai_whisper #- ASR_ENGINE=openai_whisper
- ASR_ENGINE=faster_whisper - ASR_ENGINE=faster_whisper
- OMP_NUM_THREADS=10
ports: ports:
- "127.0.0.1:9000:9000" - "127.0.0.1:9000:9000"
volumes: volumes:
@ -14,7 +15,7 @@ services:
- cache-pip:/root/.cache/pip - cache-pip:/root/.cache/pip
- cache-poetry:/root/.cache/poetry - cache-poetry:/root/.cache/poetry
- cache-whisper:/root/.cache/whisper - cache-whisper:/root/.cache/whisper
entrypoint: ["gunicorn", "--bind", "0.0.0.0:9000", "--workers", "10", "--timeout", "0", "app.webservice:app", "-k", "uvicorn.workers.UvicornWorker"] #entrypoint: ["gunicorn", "--bind", "0.0.0.0:9000", "--workers", "10", "--timeout", "0", "app.webservice:app", "-k", "uvicorn.workers.UvicornWorker"]
volumes: volumes:
cache-pip: cache-pip:

View File

@ -19,12 +19,11 @@ def audio_callback_closure(client: AsyncClient):
response = requests.post('http://127.0.0.1:9000/asr?encode=true&task=transcribe&word_timestamps=false&output=txt', files=files) response = requests.post('http://127.0.0.1:9000/asr?encode=true&task=transcribe&word_timestamps=false&output=txt', files=files)
print("Finished transcribing") print("Finished transcribing")
room_id = room.room_id room_id = room.room_id
sent_message = await client.room_send( await client.room_send(
room_id=room_id, room_id=room_id,
message_type="m.room.message", message_type="m.room.message",
content={"msgtype": "m.text", "body": response.content.decode()}, content={"msgtype": "m.text", "body": response.content.decode()},
) )
print(sent_message)
return audio_callback return audio_callback