Skip to content

Commit f3c2e29

Browse files
committed
Clean up CambTTSService
1 parent c8e4b46 commit f3c2e29

8 files changed

Lines changed: 10 additions & 18 deletions

File tree

examples/foundational/07zg-interruptible-camb.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#
2-
# Copyright (c) 2024–2025, Daily
2+
# Copyright (c) 2024–2026, Daily
33
#
44
# SPDX-License-Identifier: BSD 2-Clause License
55
#

examples/foundational/26e-gemini-live-google-search.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#
2-
# Copyright (c) 2024-2025, Daily
2+
# Copyright (c) 2024-2026, Daily
33
#
44
# SPDX-License-Identifier: BSD 2-Clause License
55
#

examples/foundational/32-gemini-grounding-metadata.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#
2-
# Copyright (c) 2024-2025, Daily
2+
# Copyright (c) 2024-2026, Daily
33
#
44
# SPDX-License-Identifier: BSD 2-Clause License
55
#

src/pipecat/services/camb/tts.py

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -248,18 +248,10 @@ async def start(self, frame: StartFrame):
248248
frame: The start frame containing initialization parameters.
249249
"""
250250
await super().start(frame)
251+
251252
# Use model-specific sample rate if not explicitly specified
252253
if not self._init_sample_rate:
253-
self._sample_rate = MODEL_SAMPLE_RATES.get(self._model_name, 22050)
254-
self._settings["sample_rate"] = self._sample_rate
255-
256-
# Warn if sample rate doesn't match model's supported rate
257-
if self._sample_rate != MODEL_SAMPLE_RATES.get(self._model_name):
258-
logger.warning(
259-
f"Camb.ai's {self._model_name} model requires "
260-
f"{MODEL_SAMPLE_RATES.get(self._model_name)}Hz sample rate. "
261-
f"Current rate of {self._sample_rate}Hz may cause issues."
262-
)
254+
self._sample_rate = MODEL_SAMPLE_RATES.get(self.model_name, 22050)
263255

264256
@traced_tts
265257
async def run_tts(self, text: str) -> AsyncGenerator[Frame, None]:

src/pipecat/tests/utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#
2-
# Copyright (c) 2024-2025 Daily
2+
# Copyright (c) 2024-2026, Daily
33
#
44
# SPDX-License-Identifier: BSD 2-Clause License
55
#

tests/test_krisp_sdk_manager.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#
2-
# Copyright (c) 2024-2025 Daily
2+
# Copyright (c) 2024-2026, Daily
33
#
44
# SPDX-License-Identifier: BSD 2-Clause License
55
#

tests/test_krisp_viva_filter.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#
2-
# Copyright (c) 2024-2025 Daily
2+
# Copyright (c) 2024-2026, Daily
33
#
44
# SPDX-License-Identifier: BSD 2-Clause License
55
#
@@ -9,7 +9,7 @@
99
import sys
1010
import tempfile
1111
import unittest
12-
from unittest.mock import AsyncMock, MagicMock, Mock, patch
12+
from unittest.mock import MagicMock, patch
1313

1414
import numpy as np
1515

tests/test_user_turn_controller.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#
2-
# Copyright (c) 2024-2026 Daily
2+
# Copyright (c) 2024-2026, Daily
33
#
44
# SPDX-License-Identifier: BSD 2-Clause License
55
#

0 commit comments

Comments
 (0)