Fix: GoogleTTSService was emitting two TTSStoppedFrames
This commit is contained in:
@@ -21,6 +21,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||||||
(e.g. `OpenAISTTService`) to try to transcribe non-spoken audio, causing
|
(e.g. `OpenAISTTService`) to try to transcribe non-spoken audio, causing
|
||||||
invalid transcriptions.
|
invalid transcriptions.
|
||||||
|
|
||||||
|
- Fixed an issue where `GoogleTTSService` was emitting two `TTSStoppedFrames`.
|
||||||
|
|
||||||
## [0.0.61] - 2025-03-26
|
## [0.0.61] - 2025-03-26
|
||||||
|
|
||||||
### Added
|
### Added
|
||||||
|
|||||||
@@ -1343,6 +1343,7 @@ class GoogleVertexLLMService(OpenAILLMService):
|
|||||||
**kwargs,
|
**kwargs,
|
||||||
):
|
):
|
||||||
"""Initializes the VertexLLMService.
|
"""Initializes the VertexLLMService.
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
credentials (Optional[str]): JSON string of service account credentials.
|
credentials (Optional[str]): JSON string of service account credentials.
|
||||||
credentials_path (Optional[str]): Path to the service account JSON file.
|
credentials_path (Optional[str]): Path to the service account JSON file.
|
||||||
@@ -1366,9 +1367,11 @@ class GoogleVertexLLMService(OpenAILLMService):
|
|||||||
@staticmethod
|
@staticmethod
|
||||||
def _get_api_token(credentials: Optional[str], credentials_path: Optional[str]) -> str:
|
def _get_api_token(credentials: Optional[str], credentials_path: Optional[str]) -> str:
|
||||||
"""Retrieves an authentication token using Google service account credentials.
|
"""Retrieves an authentication token using Google service account credentials.
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
credentials (Optional[str]): JSON string of service account credentials.
|
credentials (Optional[str]): JSON string of service account credentials.
|
||||||
credentials_path (Optional[str]): Path to the service account JSON file.
|
credentials_path (Optional[str]): Path to the service account JSON file.
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
str: OAuth token for API authentication.
|
str: OAuth token for API authentication.
|
||||||
"""
|
"""
|
||||||
@@ -1557,8 +1560,6 @@ class GoogleTTSService(TTSService):
|
|||||||
logger.exception(f"{self} error generating TTS: {e}")
|
logger.exception(f"{self} error generating TTS: {e}")
|
||||||
error_message = f"TTS generation error: {str(e)}"
|
error_message = f"TTS generation error: {str(e)}"
|
||||||
yield ErrorFrame(error=error_message)
|
yield ErrorFrame(error=error_message)
|
||||||
finally:
|
|
||||||
yield TTSStoppedFrame()
|
|
||||||
|
|
||||||
|
|
||||||
class GoogleImageGenService(ImageGenService):
|
class GoogleImageGenService(ImageGenService):
|
||||||
|
|||||||
Reference in New Issue
Block a user