INNER CODE UNIT · Python

init_voice_speed

bigsk1/voice-chat-ai · app/app.py:275

def init_voice_speed(speed_value):
    global VOICE_SPEED
    VOICE_SPEED = speed_value
    print(f"Switched to global voice speed: {speed_value}")

def init_set_tts(set_tts):
    global TTS_PROVIDER, sparktts_model
    if set_tts == 'sparktts':
        if not ensure_sparktts_available():
            print("Spark-TTS is not available. Please ensure it's properly installed.")
            loop = asyncio.get_running_loop()
            loop.create_task(send_message_to_clients(json.dumps({
                "action": "error",
                "message": "Spark-TTS is not available."
            })))
            return
        
        print(f"Initializing Spark-TTS model from {SPARKTTS_MODEL_DIR}...")

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…