6ede33ccdb
Build and Push Docker Images / create_manifest (web, surfsense-web, , cpu) (push) Has been cancelled
Build and Push Docker Images / finalize_release (push) Has been cancelled
Obsidian Plugin Lint / lint (push) Has been cancelled
Build and Push Docker Images / build (./surfsense_web, cpu, ./surfsense_web/Dockerfile, web, surfsense-web, ubuntu-24.04-arm, linux/arm64, arm64, , runner, false, cpu) (push) Has been cancelled
Build and Push Docker Images / build (./surfsense_web, cpu, ./surfsense_web/Dockerfile, web, surfsense-web, ubuntu-latest, linux/amd64, amd64, , runner, false, cpu) (push) Has been cancelled
Build and Push Docker Images / compute_version (push) Has been cancelled
Build and Push Docker Images / build (./surfsense_backend, cpu, ./surfsense_backend/Dockerfile, backend, surfsense-backend, ubuntu-24.04-arm, linux/arm64, arm64, , production, false, cpu) (push) Has been cancelled
Build and Push Docker Images / build (./surfsense_backend, cpu, ./surfsense_backend/Dockerfile, backend, surfsense-backend, ubuntu-latest, linux/amd64, amd64, , production, false, cpu) (push) Has been cancelled
Build and Push Docker Images / build (./surfsense_backend, cu126, ./surfsense_backend/Dockerfile, backend, surfsense-backend, ubuntu-24.04-arm, linux/arm64, arm64, -cuda126, production, true, cuda126) (push) Has been cancelled
Build and Push Docker Images / build (./surfsense_backend, cu126, ./surfsense_backend/Dockerfile, backend, surfsense-backend, ubuntu-latest, linux/amd64, amd64, -cuda126, production, true, cuda126) (push) Has been cancelled
Build and Push Docker Images / build (./surfsense_backend, cu128, ./surfsense_backend/Dockerfile, backend, surfsense-backend, ubuntu-24.04-arm, linux/arm64, arm64, -cuda, production, true, cuda) (push) Has been cancelled
Build and Push Docker Images / build (./surfsense_backend, cu128, ./surfsense_backend/Dockerfile, backend, surfsense-backend, ubuntu-latest, linux/amd64, amd64, -cuda, production, true, cuda) (push) Has been cancelled
Build and Push Docker Images / verify_digests (push) Has been cancelled
Build and Push Docker Images / create_manifest (backend, surfsense-backend, , cpu) (push) Has been cancelled
Build and Push Docker Images / create_manifest (backend, surfsense-backend, -cuda, cuda) (push) Has been cancelled
Build and Push Docker Images / create_manifest (backend, surfsense-backend, -cuda126, cuda126) (push) Has been cancelled
31 lines
921 B
Python
31 lines
921 B
Python
def get_voice_for_provider(provider: str, speaker_id: int = 0) -> dict | str:
|
|
"""
|
|
Get the appropriate voice configuration based on the TTS provider.
|
|
|
|
Currently single-speaker only (speaker_id=0). Multi-speaker support
|
|
will be added in a future iteration.
|
|
|
|
Args:
|
|
provider: The TTS provider (e.g., "openai/tts-1", "vertex_ai/test")
|
|
speaker_id: The ID of the speaker (default 0, single speaker for now)
|
|
|
|
Returns:
|
|
Voice configuration - string for OpenAI, dict for Vertex AI
|
|
"""
|
|
if provider == "local/kokoro":
|
|
return "af_heart"
|
|
|
|
provider_type = (
|
|
provider.split("/")[0].lower() if "/" in provider else provider.lower()
|
|
)
|
|
|
|
voices = {
|
|
"openai": "alloy",
|
|
"vertex_ai": {
|
|
"languageCode": "en-US",
|
|
"name": "en-US-Studio-O",
|
|
},
|
|
"azure": "alloy",
|
|
}
|
|
return voices.get(provider_type, {})
|