add more context and set default language=de
This commit is contained in:
parent
9f7b08e278
commit
bd9150fbcc
1 changed files with 3 additions and 2 deletions
|
@ -16,13 +16,14 @@ def audio_callback_closure(client: AsyncClient):
|
|||
#with open("/tmp/audiofile",'bw') as file:
|
||||
# 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)
|
||||
response = requests.post('http://127.0.0.1:9000/asr?encode=true&language=de&task=transcribe&word_timestamps=false&output=txt', files=files)
|
||||
print("Finished transcribing")
|
||||
room_id = room.room_id
|
||||
body = f"{room.user_name(event.sender)}: {event.body} \n{response.content.decode()}"
|
||||
await client.room_send(
|
||||
room_id=room_id,
|
||||
message_type="m.room.message",
|
||||
content={"msgtype": "m.text", "body": response.content.decode()},
|
||||
content={"msgtype": "m.text", "body": body},
|
||||
)
|
||||
return audio_callback
|
||||
|
||||
|
|
Loading…
Reference in a new issue