Skip to content

Commit

Permalink
remove normalization for gpt-sovits
Browse files Browse the repository at this point in the history
  • Loading branch information
Sobsz committed Mar 29, 2024
1 parent 60736ef commit 2a21951
Showing 1 changed file with 4 additions and 13 deletions.
17 changes: 4 additions & 13 deletions openduck-py/openduck_py/response_agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -486,19 +486,6 @@ async def speak_response(
latency=t_normalize - t_chat,
)
audio_bytes_iter = _inference(normalized)
elif self.tts_config.provider == "gptsovits":
normalized = await _normalize_text(response_text)
t_normalize = time()
await log_event(
db,
self.session_id,
"normalized_text",
meta={"text": normalized},
latency=t_normalize - t_chat,
)
audio_bytes_iter = aio_gptsovits_tts(
normalized, voice_ref=self.tts_config.voice_id
)
else:
t_normalize = time()
await log_event(
Expand All @@ -517,6 +504,10 @@ async def speak_response(
audio_bytes_iter = aio_openai_tts(response_text)
elif self.tts_config.provider == "azure":
audio_bytes_iter = aio_azure_tts(response_text)
elif self.tts_config.provider == "gptsovits":
audio_bytes_iter = aio_gptsovits_tts(
response_text, voice_ref=self.tts_config.voice_id
)

audio_chunk_bytes = bytes()
_idx = 0
Expand Down

0 comments on commit 2a21951

Please sign in to comment.