mirror of
https://github.com/MODSetter/SurfSense.git
synced 2026-04-26 09:16:22 +02:00
feat: enhance Azure OpenAI embeddings and add voice support for Azure provider
- Introduced a fixed parameter order for AzureOpenAIEmbeddings to resolve compatibility issues. - Updated the voice selection logic to include Azure voices in the podcaster utility. - Modified the page limit service to use a more efficient method for retrieving users.
This commit is contained in:
parent
34353078fe
commit
a2fb9faad6
4 changed files with 73 additions and 9 deletions
|
|
@ -63,6 +63,17 @@ def get_voice_for_provider(provider: str, speaker_id: int) -> dict | str:
|
|||
},
|
||||
}
|
||||
return vertex_voices.get(speaker_id, vertex_voices[0])
|
||||
elif provider_type == "azure":
|
||||
# OpenAI voice mapping - simple string values
|
||||
azure_voices = {
|
||||
0: "alloy", # Default/intro voice
|
||||
1: "echo", # First speaker
|
||||
2: "fable", # Second speaker
|
||||
3: "onyx", # Third speaker
|
||||
4: "nova", # Fourth speaker
|
||||
5: "shimmer", # Fifth speaker
|
||||
}
|
||||
return azure_voices.get(speaker_id, "alloy")
|
||||
|
||||
else:
|
||||
# Default fallback to OpenAI format for unknown providers
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue