Skip to content
Closed
Show file tree
Hide file tree
Changes from 8 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions .env.sample
Original file line number Diff line number Diff line change
Expand Up @@ -65,15 +65,14 @@ AZURE_OPENAI_STT_TTS_KEY=your-azure-speech-service-key # Optio
# Azure Voice Live Integration (Optional - for Azure Voice Live API)
# ============================================================================
AZURE_VOICE_LIVE_ENDPOINT=https://your-voice-live-endpoint.voice.azure.com/ # Optional: Azure Voice Live API endpoint
AZURE_VOICE_LIVE_KEY=optional-key # Optional: Azure Voice Live API key
AZURE_VOICE_LIVE_API_KEY=your-voice-live-api-key # Optional: Alternative API key name
AZURE_VOICE_LIVE_MODEL=gpt-4o # Optional: Voice Live model deployment (default: gpt-4o)
AZURE_VOICE_LIVE_API_VERSION=2024-10-01-preview # Optional: Voice Live API version

# Azure AI Foundry Integration (Optional)
AZURE_AI_FOUNDRY_ENDPOINT=https://your-foundry-endpoint.services.ai.azure.com/api/projects/your-project # Optional: AI Foundry project endpoint
AI_FOUNDRY_PROJECT_NAME=your-ai-foundry-project # Optional: AI Foundry project name

AI_FOUNDRY_AGENT_ID=your-ai-foundry-agent-id # Optional: AI Foundry agent ID
# ============================================================================
# Base URL Configuration (Required for Webhooks)
# ============================================================================
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,11 @@ jobs:
with:
python-version: '3.11'

- name: Install system dependencies
run: |
sudo apt-get update
sudo apt-get install -y portaudio19-dev

- name: Cache dependencies
uses: actions/cache@v4
with:
Expand Down
525 changes: 9 additions & 516 deletions Makefile

Large diffs are not rendered by default.

168 changes: 0 additions & 168 deletions apps/rtagent/backend/api/v1/events/demo.py

This file was deleted.

16 changes: 8 additions & 8 deletions apps/rtagent/backend/api/v1/handlers/acs_media_lifecycle.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,16 +90,17 @@ class ThreadBridge:
Implements the non-blocking patterns described in the documentation.
"""

def __init__(self):
def __init__(self, call_connection_id: Optional[str] = None):
"""
Initialize cross-thread communication bridge.

:param main_loop: Main event loop for cross-thread communication
:type main_loop: Optional[asyncio.AbstractEventLoop]
"""
self.main_loop: Optional[asyncio.AbstractEventLoop] = None
self.call_connection_id = call_connection_id
# Create shorthand for call connection ID (last 8 chars)
self.call_id_short = "unknown"
self.call_id_short = call_connection_id[-8:] if call_connection_id else "unknown"

def set_main_loop(
self, loop: asyncio.AbstractEventLoop, call_connection_id: str = None
Expand Down Expand Up @@ -454,6 +455,7 @@ class RouteTurnThread:

def __init__(
self,
call_connection_id: Optional[str],
speech_queue: asyncio.Queue,
orchestrator_func: Callable,
memory_manager: Optional[MemoManager],
Expand All @@ -468,11 +470,8 @@ def __init__(
self.running = False
self._stopped = False
# Get call ID shorthand from websocket if available
self.call_id_short = (
getattr(websocket, "_call_connection_id", "unknown")[-8:]
if hasattr(websocket, "_call_connection_id")
else "unknown"
)
self.call_connection_id = call_connection_id
self.call_id_short = call_connection_id[-8:] if call_connection_id else "unknown"

async def start(self):
"""Start the route turn processing loop."""
Expand Down Expand Up @@ -917,10 +916,11 @@ def __init__(

# Cross-thread communication
self.speech_queue = asyncio.Queue(maxsize=10)
self.thread_bridge = ThreadBridge()
self.thread_bridge = ThreadBridge(call_connection_id=self.call_connection_id)

# Initialize threads
self.route_turn_thread = RouteTurnThread(
call_connection_id=self.call_connection_id,
speech_queue=self.speech_queue,
orchestrator_func=orchestrator_func,
memory_manager=memory_manager,
Expand Down
95 changes: 0 additions & 95 deletions apps/rtagent/backend/config/app_settings_new.py

This file was deleted.

3 changes: 2 additions & 1 deletion apps/rtagent/backend/config/infrastructure.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,8 @@ def __str__(self):
ACS_ENDPOINT: str = os.getenv("ACS_ENDPOINT", "")
ACS_CONNECTION_STRING: str = os.getenv("ACS_CONNECTION_STRING", "")
ACS_SOURCE_PHONE_NUMBER: str = os.getenv("ACS_SOURCE_PHONE_NUMBER", "")
BASE_URL: str = os.getenv("BASE_URL", "")
# Base application URL (ensure no trailing slash)
BASE_URL: str = os.getenv("BASE_URL", "").rstrip("/")

# ACS Streaming configuration
ACS_STREAMING_MODE: StreamMode = StreamMode(
Expand Down
7 changes: 5 additions & 2 deletions apps/rtagent/backend/config/voice_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,9 @@ def get_agent_voice(agent_config_path: str) -> str:
# AZURE VOICE LIVE SETTINGS
# ==============================================================================

AZURE_VOICE_LIVE_ENDPOINT = os.getenv("AZURE_VOICE_LIVE_ENDPOINT", "")
AZURE_VOICE_API_KEY = os.getenv("AZURE_VOICE_API_KEY", "")
AZURE_VOICE_LIVE_ENDPOINT = os.getenv("AZURE_SPEECH_ENDPOINT", "")
AZURE_VOICE_API_KEY = os.getenv("AZURE_SPEECH_KEY", "")
AZURE_VOICE_LIVE_MODEL = os.getenv("AZURE_VOICE_LIVE_MODEL", "gpt-4o")
# AZURE_VOICE_LIVE_ENDPOINT = os.getenv("AZURE_VOICE_LIVE_ENDPOINT", "")
# AZURE_VOICE_API_KEY = os.getenv("AZURE_VOICE_API_KEY", "")
# AZURE_VOICE_LIVE_MODEL = os.getenv("AZURE_VOICE_LIVE_MODEL", "gpt-4o")
Comment on lines +99 to +101
Copy link

Copilot AI Sep 28, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The commented-out legacy environment variables should be removed rather than left as comments. If they need to be preserved for reference, consider documenting the migration in a separate documentation file or changelog.

Suggested change
# AZURE_VOICE_LIVE_ENDPOINT = os.getenv("AZURE_VOICE_LIVE_ENDPOINT", "")
# AZURE_VOICE_API_KEY = os.getenv("AZURE_VOICE_API_KEY", "")
# AZURE_VOICE_LIVE_MODEL = os.getenv("AZURE_VOICE_LIVE_MODEL", "gpt-4o")

Copilot uses AI. Check for mistakes.
Loading
Loading