Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

'DeepgramSTTService' object has no attribute 'sample_rate' #1315

Open
agilebean opened this issue Feb 28, 2025 · 2 comments
Open

'DeepgramSTTService' object has no attribute 'sample_rate' #1315

agilebean opened this issue Feb 28, 2025 · 2 comments
Labels
need-more-info waiting on more info from requester

Comments

@agilebean
Copy link

Problem Root Cause

  1. sample_rate is passed from DeepgramSTTService(STTService) to the parent class (STTService) in the init method
  2. DeepgramSTTService's start method tries to access sample rate:
async def start(self, frame: StartFrame):
    await super().start(frame)
    self._settings["sample_rate"] = self.sample_rate  # <-- THIS IS THE ISSUE
    await self._connect()
  1. STTService class in ai_services.py did not initialize a sample_rate attribute in its init method -> throws error 'DeepgramSTTService' object has no attribute 'sample_rate'

Suggested Solution

In STTService, initialize sample rate analog to the TTSService class:
self._sample_rate: int = sample_rate

@aconchillo
Copy link
Contributor

@chadbailey59
Copy link
Contributor

Can you try recreating your venv and reproducing this with some example code in the current version, 0.0.58?

@chadbailey59 chadbailey59 added the need-more-info waiting on more info from requester label Mar 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
need-more-info waiting on more info from requester
Projects
None yet
Development

No branches or pull requests

3 participants