From c27f76cad1ddca5a9f4cb1139e8fb4b716fa8d8a Mon Sep 17 00:00:00 2001 From: Marmik Pandya Date: Mon, 24 Jun 2024 21:32:35 +0530 Subject: [PATCH] make sure for telephone input sampling rate is always 8k KHz --- bolna/transcriber/bodhi_transcriber.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bolna/transcriber/bodhi_transcriber.py b/bolna/transcriber/bodhi_transcriber.py index 17aa7965..5bced805 100644 --- a/bolna/transcriber/bodhi_transcriber.py +++ b/bolna/transcriber/bodhi_transcriber.py @@ -34,7 +34,7 @@ def __init__(self, telephony_provider, input_queue=None, model='hi-general-v2-8k self.heartbeat_task = None self.sender_task = None self.model = "hi-general-v2-8khz" - self.sampling_rate = sampling_rate + self.sampling_rate = 8000 if telephony_provider in ["plivo", "twilio", "exotel"] else sampling_rate self.api_key = kwargs.get("transcriber_key", os.getenv('BODHI_API_KEY')) self.api_host = os.getenv('BODHI_HOST', 'bodhi.navana.ai') self.transcriber_output_queue = output_queue