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:
DESKTOP-RTLN3BA\$punk 2025-10-30 22:33:47 -07:00
parent 34353078fe
commit a2fb9faad6
4 changed files with 73 additions and 9 deletions

View file

@ -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