getting started on 06-
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
import logging
|
||||
|
||||
from asyncio import Queue
|
||||
from abc import abstractmethod
|
||||
from collections.abc import AsyncGenerator
|
||||
|
||||
from typing import AsyncGenerator
|
||||
from dataclasses import dataclass
|
||||
|
||||
|
||||
@@ -16,9 +16,7 @@ class AIService:
|
||||
class LLMService(AIService):
|
||||
# Generate a set of responses to a prompt. Yields a list of responses.
|
||||
@abstractmethod
|
||||
async def run_llm_async(
|
||||
self, messages
|
||||
) -> AsyncGenerator[str, None]:
|
||||
async def run_llm_async(self, messages) -> AsyncGenerator[str, None]:
|
||||
pass
|
||||
|
||||
# Generate a responses to a prompt. Returns the response
|
||||
|
||||
@@ -222,13 +222,13 @@ class DailyTransportService(EventHandler):
|
||||
pass
|
||||
|
||||
def on_transcription_stopped(self, stopped_by, stopped_by_error):
|
||||
self.logger.info(f"Transcription stopped {stopped_by}, {stopped_by_error}")
|
||||
pass
|
||||
|
||||
def on_transcription_error(self, message):
|
||||
self.logger.error(f"Transcription error {message}")
|
||||
pass
|
||||
|
||||
def on_transcription_started(self, status):
|
||||
self.logger.info(f"Transcription started {status}")
|
||||
pass
|
||||
|
||||
def set_image(self, image: bytes):
|
||||
self.image: bytes | None = image
|
||||
|
||||
@@ -20,7 +20,6 @@ class GoogleAIService(AIService):
|
||||
)
|
||||
|
||||
def run_tts(self, sentence):
|
||||
print("running google tts")
|
||||
synthesis_input = texttospeech.SynthesisInput(text = sentence.strip())
|
||||
result = self.client.synthesize_speech(input=synthesis_input, voice=self.voice, audio_config=self.audio_config)
|
||||
return result
|
||||
|
||||
Reference in New Issue
Block a user