Skip to content

Commit a6ea374

Browse files
authored
Refactor to include audio data for all MQ-originated requests (#188)
# Description Replace check for `klat_data` context with `mq` context to include encoded audio in responses to other clients (i.e. Gradio) # Issues <!-- If this is related to or closes an issue/other PR, please note them here --> # Other Notes Currently works because the messagebus-mq connector module [guarantees Klat context](https://github.com/NeonGeckoCom/neon-messagebus-mq-connector/blob/65192ecdd9f896799a2be3a9a76bdffa566c9527/neon_messagebus_mq_connector/controller.py#L313-L320) for any MQ messages received
1 parent 8871dc9 commit a6ea374

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

neon_audio/tts/neon.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -352,7 +352,7 @@ def get_multiple_tts(self, message, **kwargs) -> dict:
352352
responses[tts_lang][request["gender"]] = wav_file
353353
responses[tts_lang]["genders"].append(request["gender"])
354354
# If this is a remote request, encode audio in the response
355-
if message.context.get("klat_data") or \
355+
if message.context.get("mq") or \
356356
message.msg_type == "neon.get_tts":
357357
responses[tts_lang].setdefault("audio", {})
358358
responses[tts_lang]["audio"][request["gender"]] = \

0 commit comments

Comments
 (0)