Merge pull request #2931 from ivaaan/hume-bugfix
Hume: use Octave v1 if description provided
This commit is contained in:
@@ -45,6 +45,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||||||
- Fixed an issue in `ServiceSwitcher` where the `STTService`s would result in
|
- Fixed an issue in `ServiceSwitcher` where the `STTService`s would result in
|
||||||
all STT services producing `TranscriptionFrame`s.
|
all STT services producing `TranscriptionFrame`s.
|
||||||
|
|
||||||
|
- Fixed an issue in `HumeTTSService` that was only using Octave 2, which does not support the `description` field. Now, if a description is provided, it switches to Octave 1.
|
||||||
|
|
||||||
## [0.0.91] - 2025-10-21
|
## [0.0.91] - 2025-10-21
|
||||||
|
|
||||||
### Added
|
### Added
|
||||||
@@ -5320,4 +5322,4 @@ a bit.
|
|||||||
|
|
||||||
## [0.0.2] - 2024-03-12
|
## [0.0.2] - 2024-03-12
|
||||||
|
|
||||||
Initial public release.
|
Initial public release.
|
||||||
@@ -184,11 +184,15 @@ class HumeTTSService(TTSService):
|
|||||||
# Hume emits mono PCM at 48 kHz; downstream can resample if needed.
|
# Hume emits mono PCM at 48 kHz; downstream can resample if needed.
|
||||||
# We buffer audio bytes before sending to prevent glitches.
|
# We buffer audio bytes before sending to prevent glitches.
|
||||||
self._audio_bytes = b""
|
self._audio_bytes = b""
|
||||||
|
|
||||||
|
# Use version "2" by default if no description is provided
|
||||||
|
# Version "1" is needed when description is used
|
||||||
|
version = "1" if self._params.description is not None else "2"
|
||||||
async for chunk in self._client.tts.synthesize_json_streaming(
|
async for chunk in self._client.tts.synthesize_json_streaming(
|
||||||
utterances=[utterance],
|
utterances=[utterance],
|
||||||
format=pcm_fmt,
|
format=pcm_fmt,
|
||||||
instant_mode=True,
|
instant_mode=True,
|
||||||
version="2",
|
version=version,
|
||||||
):
|
):
|
||||||
audio_b64 = getattr(chunk, "audio", None)
|
audio_b64 = getattr(chunk, "audio", None)
|
||||||
if not audio_b64:
|
if not audio_b64:
|
||||||
|
|||||||
Reference in New Issue
Block a user