Skip to main content
Glama

Voice Mode

by mbailey
kokoro_helpers.py•1.8 kB
"""Helper functions for kokoro service management.""" import platform import subprocess from pathlib import Path from typing import Optional from voice_mode.utils.gpu_detection import has_gpu_support as _has_gpu_support def find_kokoro_fastapi() -> Optional[str]: """Find the kokoro-fastapi installation directory.""" # Check common installation paths paths_to_check = [ Path.home() / ".voicemode" / "services" / "kokoro", # New location Path.home() / ".voicemode" / "kokoro-fastapi", # Legacy location Path.home() / "kokoro-fastapi", Path("/opt/kokoro-fastapi"), ] for path in paths_to_check: if path.exists() and path.is_dir(): # Look for start scripts if platform.system() == "Darwin": start_script = path / "start-gpu_mac.sh" else: # Check for appropriate start script if has_gpu_support(): # Prefer GPU script, fallback to general start possible_scripts = [ path / "start-gpu.sh" ] else: # Prefer CPU script, fallback to general start possible_scripts = [ path / "start-cpu.sh" ] # Find first existing script start_script = next((script for script in possible_scripts if script.exists()), None) if start_script and start_script.exists(): return str(path) return None def has_gpu_support() -> bool: """Check if the system has GPU support for Kokoro. This is a wrapper around the shared GPU detection utility. """ return _has_gpu_support()

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/mbailey/voicemode'

If you have feedback or need assistance with the MCP directory API, please join our Discord server