sachin
commited on
Commit
·
6a6d015
1
Parent(s):
f25cff8
fix
Browse files- src/server/main.py +2 -10
src/server/main.py
CHANGED
@@ -670,12 +670,8 @@ async def speech_to_speech(
|
|
670 |
logger.info(f"Processed text: {processed_text.response}")
|
671 |
|
672 |
# Step 3: Convert processed text to speech
|
673 |
-
audio_response = await
|
674 |
input=processed_text.response,
|
675 |
-
voice=voice,
|
676 |
-
model=tts_config.model,
|
677 |
-
response_format=config.response_format,
|
678 |
-
speed=SPEED
|
679 |
)
|
680 |
return audio_response
|
681 |
|
@@ -720,11 +716,7 @@ if __name__ == "__main__":
|
|
720 |
model = AutoModel.from_pretrained(asr_model_name, trust_remote_code=True)
|
721 |
asr_manager.model_language[selected_config["language"]] = selected_config["components"]["ASR"]["language_code"]
|
722 |
|
723 |
-
|
724 |
-
if selected_config["components"]["TTS"]:
|
725 |
-
tts_model_name = selected_config["components"]["TTS"]["model"]
|
726 |
-
tts_config.model = tts_model_name # Update tts_config to use the selected model
|
727 |
-
tts_model_manager.get_or_load_model(tts_model_name)
|
728 |
|
729 |
# Initialize Translation models - load all specified models
|
730 |
if selected_config["components"]["Translation"]:
|
|
|
670 |
logger.info(f"Processed text: {processed_text.response}")
|
671 |
|
672 |
# Step 3: Convert processed text to speech
|
673 |
+
audio_response = await synthesize_kannada(
|
674 |
input=processed_text.response,
|
|
|
|
|
|
|
|
|
675 |
)
|
676 |
return audio_response
|
677 |
|
|
|
716 |
model = AutoModel.from_pretrained(asr_model_name, trust_remote_code=True)
|
717 |
asr_manager.model_language[selected_config["language"]] = selected_config["components"]["ASR"]["language_code"]
|
718 |
|
719 |
+
|
|
|
|
|
|
|
|
|
720 |
|
721 |
# Initialize Translation models - load all specified models
|
722 |
if selected_config["components"]["Translation"]:
|