Compare commits
7 Commits
v0.0.71
...
mb/fix-11l
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e3df83ca2e | ||
|
|
dc640a7591 | ||
|
|
1f072d182c | ||
|
|
1d64e04ed5 | ||
|
|
22f4f0b79e | ||
|
|
69c63293fb | ||
|
|
c1db13ceeb |
16
CHANGELOG.md
16
CHANGELOG.md
@@ -5,6 +5,22 @@ All notable changes to **Pipecat** will be documented in this file.
|
||||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
||||
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
||||
|
||||
## [Unreleased]
|
||||
|
||||
### Fixed
|
||||
|
||||
- Fixed an issue where `voice_settings` weren't being applied to
|
||||
`ElevenLabsTTSService`.
|
||||
|
||||
- Fixed an issue with `GoogleSTTService` where it was constantly reconnecting
|
||||
before starting to receive audio from the user.
|
||||
|
||||
- Fixed an issue where `GoogleLLMService`'s TTFB value was incorrect.
|
||||
|
||||
### Other
|
||||
|
||||
- Rename `14e-function-calling-gemini.py` to `14e-function-calling-google.py`.
|
||||
|
||||
## [0.0.71] - 2025-06-10
|
||||
|
||||
### Added
|
||||
|
||||
@@ -140,6 +140,8 @@ def build_elevenlabs_voice_settings(
|
||||
if key in settings and settings[key] is not None:
|
||||
voice_settings[key] = settings[key]
|
||||
|
||||
print(f"Built voice settings: {voice_settings}")
|
||||
|
||||
return voice_settings or None
|
||||
|
||||
|
||||
@@ -249,6 +251,7 @@ class ElevenLabsTTSService(AudioContextWordTTSService):
|
||||
return language_to_elevenlabs_language(language)
|
||||
|
||||
def _set_voice_settings(self):
|
||||
print(f"Setting voice settings for ElevenLabs TTS: {self._settings}")
|
||||
return build_elevenlabs_voice_settings(self._settings)
|
||||
|
||||
async def set_model(self, model: str):
|
||||
@@ -430,15 +433,20 @@ class ElevenLabsTTSService(AudioContextWordTTSService):
|
||||
async def _send_text(self, text: str):
|
||||
if self._websocket:
|
||||
if not self._context_id:
|
||||
# Create new context ID
|
||||
new_context_id = str(uuid.uuid4())
|
||||
# Register the context with the audio context manager
|
||||
await self.create_audio_context(new_context_id)
|
||||
|
||||
# First message for a new context - need a space to initialize
|
||||
msg = {"text": " ", "context_id": str(uuid.uuid4())}
|
||||
msg = {"text": " ", "context_id": new_context_id}
|
||||
|
||||
# Add voice settings only in first message for a context
|
||||
if self._voice_settings:
|
||||
msg["voice_settings"] = self._voice_settings
|
||||
|
||||
await self._websocket.send(json.dumps(msg))
|
||||
self._context_id = msg["context_id"]
|
||||
self._context_id = new_context_id
|
||||
logger.trace(f"Created new context {self._context_id}")
|
||||
|
||||
# Now send the actual text content
|
||||
@@ -471,9 +479,6 @@ class ElevenLabsTTSService(AudioContextWordTTSService):
|
||||
yield TTSStartedFrame()
|
||||
self._started = True
|
||||
self._cumulative_time = 0
|
||||
# Create new context ID and register it
|
||||
self._context_id = str(uuid.uuid4())
|
||||
await self.create_audio_context(self._context_id)
|
||||
|
||||
await self._send_text(text)
|
||||
await self.start_tts_usage_metrics(text)
|
||||
|
||||
@@ -555,10 +555,11 @@ class GoogleLLMService(LLMService):
|
||||
contents=messages,
|
||||
config=generation_config,
|
||||
)
|
||||
await self.stop_ttfb_metrics()
|
||||
|
||||
function_calls = []
|
||||
async for chunk in response:
|
||||
# Stop TTFB metrics after the first chunk
|
||||
await self.stop_ttfb_metrics()
|
||||
if chunk.usage_metadata:
|
||||
prompt_tokens += chunk.usage_metadata.prompt_token_count or 0
|
||||
completion_tokens += chunk.usage_metadata.candidates_token_count or 0
|
||||
|
||||
@@ -747,6 +747,11 @@ class GoogleSTTService(STTService):
|
||||
try:
|
||||
while True:
|
||||
try:
|
||||
if self._request_queue.empty():
|
||||
# wait for 10ms in case we don't have audio
|
||||
await asyncio.sleep(0.01)
|
||||
continue
|
||||
|
||||
# Start bi-directional streaming
|
||||
streaming_recognize = await self._client.streaming_recognize(
|
||||
requests=self._request_generator()
|
||||
|
||||
Reference in New Issue
Block a user