WIP: environment cleanup (#19)

* removed env var usage from SDK services

* started consolidating configure.py

* 1–3 work

* cleaned up the rest

* more cleanup

* cleanup and 05 tinkering

* made fal keys optional
This commit is contained in:
chadbailey59
2024-02-06 15:07:16 -06:00
committed by GitHub
parent 9d5ad5675c
commit 70d07b6ea2
24 changed files with 475 additions and 804 deletions

View File

@@ -12,14 +12,15 @@ class ElevenLabsTTSService(TTSService):
def __init__(
self,
*,
aiohttp_session: aiohttp.ClientSession,
api_key=None,
voice_id=None,
api_key,
voice_id,
):
super().__init__()
self._api_key = api_key or os.getenv("ELEVENLABS_API_KEY")
self._voice_id = voice_id or os.getenv("ELEVENLABS_VOICE_ID")
self._api_key = api_key
self._voice_id = voice_id
self._aiohttp_session = aiohttp_session
async def run_tts(self, sentence) -> AsyncGenerator[bytes, None]: