mirror of
https://github.com/MODSetter/SurfSense.git
synced 2026-04-28 18:36:23 +02:00
feat: init video presentation agent
This commit is contained in:
parent
40d949b7d5
commit
b28f135a96
37 changed files with 3567 additions and 24 deletions
30
surfsense_backend/app/agents/video_presentation/utils.py
Normal file
30
surfsense_backend/app/agents/video_presentation/utils.py
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
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, {})
|
||||
Loading…
Add table
Add a link
Reference in a new issue