diff --git a/pyproject.toml b/pyproject.toml index b4f2fb4a0..510c248c4 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -9,13 +9,20 @@ homepage = "https://github.com/vocodedev/vocode-python" [tool.poetry.dependencies] -python = ">=3.10,<4.0" -aiohttp = "^3.9.5" -anthropic = "^0.28.0" -azure-cognitiveservices-speech = "^1.37.0" -cartesia = "^0.1.1" -elevenlabs = "^1.2.2" -fastapi = "^0.111.0" +python = ">=3.8.1,<3.12" +pydub = "^0.25.1" +nltk = "^3.8.1" +openai = "^0.27.8" +sounddevice = "^0.4.6" +azure-cognitiveservices-speech = "^1.27.0" +websockets = "^11.0.2" +requests = "^2.28.2" +uvicorn = "^0.21.1" +fastapi = "^0.100.1" +jinja2 = "^3.1.2" +python-multipart = "^0.0.6" +six = "^1.16.0" +opentelemetry-sdk = "^1.17.0" janus = "^1.0.0" jinja2 = "^3.1.4" jsonschema = "^4.22.0" diff --git a/vocode/streaming/synthesizer/default_factory.py b/vocode/streaming/synthesizer/default_factory.py index 16574d4e5..e69de29bb 100644 --- a/vocode/streaming/synthesizer/default_factory.py +++ b/vocode/streaming/synthesizer/default_factory.py @@ -1,47 +0,0 @@ -from typing import Type -from vocode.streaming.models.synthesizer import ( - AzureSynthesizerConfig, - CartesiaSynthesizerConfig, - ElevenLabsSynthesizerConfig, - PlayHtSynthesizerConfig, - RimeSynthesizerConfig, - StreamElementsSynthesizerConfig, - SynthesizerConfig, -) -from vocode.streaming.synthesizer.abstract_factory import AbstractSynthesizerFactory -from vocode.streaming.synthesizer.azure_synthesizer import AzureSynthesizer -from vocode.streaming.synthesizer.base_synthesizer import BaseSynthesizer -from vocode.streaming.synthesizer.cartesia_synthesizer import CartesiaSynthesizer -from vocode.streaming.synthesizer.eleven_labs_synthesizer import ElevenLabsSynthesizer -from vocode.streaming.synthesizer.eleven_labs_websocket_synthesizer import ElevenLabsWSSynthesizer -from vocode.streaming.synthesizer.play_ht_synthesizer import PlayHtSynthesizer -from vocode.streaming.synthesizer.play_ht_synthesizer_v2 import PlayHtSynthesizerV2 -from vocode.streaming.synthesizer.rime_synthesizer import RimeSynthesizer -from vocode.streaming.synthesizer.stream_elements_synthesizer import StreamElementsSynthesizer - - -class DefaultSynthesizerFactory(AbstractSynthesizerFactory): - def create_synthesizer( - self, - synthesizer_config: SynthesizerConfig, - ): - if isinstance(synthesizer_config, AzureSynthesizerConfig): - return AzureSynthesizer(synthesizer_config) - elif isinstance(synthesizer_config, CartesiaSynthesizerConfig): - return CartesiaSynthesizer(synthesizer_config) - elif isinstance(synthesizer_config, ElevenLabsSynthesizerConfig): - eleven_labs_synthesizer_class_type: Type[BaseSynthesizer] = ElevenLabsSynthesizer - if synthesizer_config.experimental_websocket: - eleven_labs_synthesizer_class_type = ElevenLabsWSSynthesizer - return eleven_labs_synthesizer_class_type(synthesizer_config) - elif isinstance(synthesizer_config, PlayHtSynthesizerConfig): - if synthesizer_config.version == "2": - return PlayHtSynthesizerV2(synthesizer_config) - else: - return PlayHtSynthesizer(synthesizer_config) - elif isinstance(synthesizer_config, RimeSynthesizerConfig): - return RimeSynthesizer(synthesizer_config) - elif isinstance(synthesizer_config, StreamElementsSynthesizerConfig): - return StreamElementsSynthesizer(synthesizer_config) - else: - raise Exception("Invalid synthesizer config")