Spaces:
Configuration error
Configuration error
| from openai import OpenAI | |
| from elevenlabs.client import ElevenLabs | |
| from tts.audio_edge_tts import EdgeTTS | |
| from config.constant import OPENAI_API_KEY, ELEVENLABS_API_KEY | |
| # from rtc.rtc_call import RTCHandler | |
| from rtc.rtc_call import RTCHandler | |
| from stt.whisper_stt import WhisperSTT | |
| whisper_stt = WhisperSTT(model_size = "base", device = "cuda") | |
| edge_tts = EdgeTTS("id-ID-ArdiNeural", "+0%", "+0%") | |
| openai_client = OpenAI(api_key = OPENAI_API_KEY) | |
| rtc_handler = RTCHandler(whisper_stt, edge_tts) | |
| def handle_rtc(): | |
| rtc_handler.launch_ui() | |
| def handle_rtc_server(): | |
| rtc_handler.start_server() |