Skip to content

Commit

Permalink
chore: correct _tts_invoke_streaming max length (langgenius#7423)
Browse files Browse the repository at this point in the history
  • Loading branch information
ZuzooVn authored and JunXu01 committed Nov 9, 2024
1 parent f92020a commit 03ed86c
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ def _tts_invoke_streaming(self, model: str, credentials: dict, content_text: st
# doc: https://platform.openai.com/docs/guides/text-to-speech
credentials_kwargs = self._to_credential_kwargs(credentials)
client = AzureOpenAI(**credentials_kwargs)
# max font is 4096,there is 3500 limit for each request
# max length is 4096 characters, there is 3500 limit for each request
max_length = 3500
if len(content_text) > max_length:
sentences = self._split_text_into_sentences(content_text, max_length=max_length)
Expand Down

0 comments on commit 03ed86c

Please sign in to comment.