[inworld] aggregate_sentence mode needs trailing space

This commit is contained in:
Ian Lee
2026-02-06 12:43:23 -08:00
parent 8d37d3bae7
commit f3d99adf8f
2 changed files with 4 additions and 0 deletions

1
changelog/3667.fixed.md Normal file
View File

@@ -0,0 +1 @@
- Fixed an issue in `InworldTTSService` where punctuation was pronounced. Now, the `InworldTTSService` ensures proper spacing between sentences, resolving pronunciation issues.

View File

@@ -439,6 +439,7 @@ class InworldTTSService(AudioContextWordTTSService):
encoding: str = "LINEAR16",
params: InputParams = None,
aggregate_sentences: bool = True,
append_trailing_space: bool = True,
**kwargs: Any,
):
"""Initialize the Inworld WebSocket TTS service.
@@ -452,6 +453,7 @@ class InworldTTSService(AudioContextWordTTSService):
encoding: Audio encoding format.
params: Input parameters for Inworld WebSocket TTS configuration.
aggregate_sentences: Whether to aggregate sentences before synthesis.
append_trailing_space: Whether to append a trailing space to text before sending to TTS.
**kwargs: Additional arguments passed to the parent class.
"""
super().__init__(
@@ -460,6 +462,7 @@ class InworldTTSService(AudioContextWordTTSService):
pause_frame_processing=True,
sample_rate=sample_rate,
aggregate_sentences=aggregate_sentences,
append_trailing_space=append_trailing_space,
**kwargs,
)