Fixed an issue with GoogleSTTService where it was constantly reconnecting before starting to receive audio from the user.
This commit is contained in:
@@ -5,6 +5,13 @@ 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/),
|
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).
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
||||||
|
|
||||||
|
## Unreleased
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
|
||||||
|
- Fixed an issue with `GoogleSTTService` where it was constantly reconnecting
|
||||||
|
before starting to receive audio from the user.
|
||||||
|
|
||||||
## [0.0.71] - 2025-06-10
|
## [0.0.71] - 2025-06-10
|
||||||
|
|
||||||
### Added
|
### Added
|
||||||
|
|||||||
@@ -747,6 +747,11 @@ class GoogleSTTService(STTService):
|
|||||||
try:
|
try:
|
||||||
while True:
|
while True:
|
||||||
try:
|
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
|
# Start bi-directional streaming
|
||||||
streaming_recognize = await self._client.streaming_recognize(
|
streaming_recognize = await self._client.streaming_recognize(
|
||||||
requests=self._request_generator()
|
requests=self._request_generator()
|
||||||
|
|||||||
Reference in New Issue
Block a user