add more worker

This commit is contained in:
Moritz 2024-08-14 10:05:33 +02:00
parent 6aec5226ba
commit cb45e37b68
2 changed files with 4 additions and 1 deletions

View file

@ -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