Skip to content

Commit

Permalink
services(riva): convention tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
vipyne committed Dec 10, 2024
1 parent f4af4af commit 59ebb56
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/pipecat/services/riva.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ def __init__(
self._voice_id = voice_id
self._sample_rate = sample_rate
self._language_code = params.language
self.quality = params.quality
self._quality = params.quality

self.set_model_name("fastpitch-hifigan-tts")
self.set_voice(voice_id)
Expand All @@ -79,7 +79,7 @@ def read_audio_responses():
self._language_code,
sample_rate_hz=self._sample_rate,
audio_prompt_file=None,
quality=self.quality,
quality=self._quality,
custom_dictionary={},
)
return responses
Expand Down Expand Up @@ -146,7 +146,7 @@ def __init__(
]
auth = riva.client.Auth(None, True, server, metadata)

self.asr_service = riva.client.ASRService(auth)
self._asr_service = riva.client.ASRService(auth)

config = riva.client.StreamingRecognitionConfig(
config=riva.client.RecognitionConfig(
Expand Down Expand Up @@ -175,7 +175,7 @@ def __init__(
self._stop_threshold_eou,
)
riva.client.add_custom_configuration_to_config(config, self._custom_configuration)
self.config = config
self._config = config

self._queue = asyncio.Queue()

Expand Down Expand Up @@ -203,9 +203,9 @@ async def _stop_tasks(self):
await self._response_task

def _response_handler(self):
responses = self.asr_service.streaming_response_generator(
responses = self._asr_service.streaming_response_generator(
audio_chunks=self,
streaming_config=self.config,
streaming_config=self._config,
)
for response in responses:
if not response.results:
Expand Down

0 comments on commit 59ebb56

Please sign in to comment.