#!/bin/bash SESSION="s2s_pipeline" tmux kill-session -t $SESSION 2>/dev/null echo "🚀 Avvio dell'architettura Speech-to-Speech (Docker gestisce vLLM)..." # 1. Avvia la Pipeline Audio (Speech-to-Speech) echo "🔹 Terminale 1: Avvio della Pipeline Audio Realtime (Porta 12345)..." tmux new-session -d -s $SESSION -n "pipeline" tmux send-keys -t $SESSION:pipeline "PYTHONPATH=src ./venv/bin/python src/speech_to_speech/s2s_pipeline.py --mode realtime --ws_host 0.0.0.0 --ws_port 12345 --llm_backend chat-completions --qwen3_tts_backend torch --model_name meta/llama-3.1-8b-instruct --responses_api_base_url http://127.0.0.1:8000/v1 --responses_api_api_key 'EMPTY'" C-m # 2. Avvia il Server Proxy UI (Uvicorn) echo "🔹 Terminale 2: Avvio dell'interfaccia Demo (Porta 7960)..." tmux new-window -t $SESSION -n "demo_ui" tmux send-keys -t $SESSION:demo_ui "PYTHONPATH=demo uvicorn demo.server:app --host 0.0.0.0 --port 7960 --reload" C-m echo "✅ Servizi S2S avviati in tmux!" echo "-----------------------------------------------------------------" echo "👉 Per vedere i log della Pipeline: tmux attach -t $SESSION:0" echo "👉 Per vedere i log della Demo UI: tmux attach -t $SESSION:1" echo "-----------------------------------------------------------------"