Open
Conversation
- Add 'azure-foundry-tts' to TTSProviderId union type - Register azure-foundry-tts provider in constants.ts with standard Neural and premium DragonHD voices (en-US, zh-CN, ca-ES, es-ES) - Add getVoiceLanguage() helper to extract BCP-47 locale from Azure voice ID - Fix xml:lang hardcoded 'zh-CN' bug in generateAzureTTS (now dynamic) - Add generateAzureFoundryTTS() using multi-service Cognitive Services URL - Wire new provider into generateTTS() switch, settings store, env map and i18n Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…mponents The provider name mapping in audio-settings.tsx, settings/index.tsx and media-popover.tsx was missing the 'azure-foundry-tts' entry, causing the sidebar label to appear blank. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…y-tts voices - Add voice Select dropdown to audio-settings.tsx for all providers with voices defined in constants (excludes azure-tts which uses its own locale-filter + big JSON approach) - Add Multilingual Neural voices: AvaMultilingual, AndrewMultilingual, AdamMultilingual - Add Adam:DragonHDLatestNeural HD voice - Voices list now totals 20 entries covering en-US, zh-CN, ca-ES, es-ES Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…s URL preview - Add voice Select dropdown to tts-settings.tsx for all providers with voices in constants (syncs to global store when provider is active, uses local state when testing a non-active provider) - Add 'azure-foundry-tts' to URL preview switch (/cognitiveservices/v1) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Detect unconfigured {resource} placeholder and throw clear message
- Validate API key presence before making the request
- Include HTTP status code, response body and actual endpoint URL in errors
- Strip trailing slash from base URL before appending path
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…rvices/v1 Custom domain endpoints (*.cognitiveservices.azure.com) require the /tts/ prefix before /cognitiveservices/v1, unlike regional endpoints which use just /cognitiveservices/v1 directly on the TTS subdomain. Ref: https://learn.microsoft.com/azure/ai-services/speech-service/speech-services-private-link Standard: {region}.tts.speech.microsoft.com/cognitiveservices/v1 Custom: {custom}.cognitiveservices.azure.com/tts/cognitiveservices/v1 Also update URL preview in tts-settings.tsx to show the correct path. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a new
azure-foundry-ttsTTS provider for Azure AI Foundry (multi-service Cognitive Services endpoints), including support for premium DragonHD Neural voices. Also fixes a pre-existing bug ingenerateAzureTTSwherexml:langwas hardcoded tozh-CNregardless of the selected voice.Related Issues
Changes
lib/audio/types.ts— Added'azure-foundry-tts'to theTTSProviderIdunionlib/audio/constants.ts— Registered the new provider with 20 voices: standard Neural, Multilingual Neural (AvaMultilingual,AndrewMultilingual,AdamMultilingual), and premium DragonHD Neural (en-US-Ava:DragonHDLatestNeural, etc.) coveringen-US,zh-CN,ca-ES,es-ESlib/audio/tts-providers.ts— AddedgetVoiceLanguage()helper to extract BCP-47 from any Azure voice ID; fixedxml:langhardcoding bug ingenerateAzureTTS; addedgenerateAzureFoundryTTS()using the custom domain path/tts/cognitiveservices/v1(required for*.cognitiveservices.azure.comendpoints per Microsoft docs); addedcase 'azure-foundry-tts'to thegenerateTTS()dispatch switchlib/store/settings.ts— Added'azure-foundry-tts'entry in defaultttsProvidersConfiglib/server/provider-config.ts— AddedTTS_AZURE_FOUNDRY: 'azure-foundry-tts'toTTS_ENV_MAP(enablesTTS_AZURE_FOUNDRY_API_KEY/TTS_AZURE_FOUNDRY_BASE_URLenv vars)lib/i18n/settings.ts— AddedproviderAzureFoundryTTS: 'Azure AI Foundry TTS'to all locale exportscomponents/settings/tts-settings.tsx— Added voice selector dropdown; added URL preview forazure-foundry-tts; provider label mappingcomponents/settings/audio-settings.tsx— Added voice selector for all providers with voices defined in constantscomponents/settings/index.tsx/components/generation/media-popover.tsx— Added provider label mappingType of Change
xml:langhardcoding ingenerateAzureTTSazure-foundry-ttsproviderVerification
Steps to reproduce / test
https://<your-resource>.cognitiveservices.azure.com).../tts/cognitiveservices/v1en-US-Ava:DragonHDLatestNeural)xml:langin the SSML now matches the voice localeWhat you personally verified
/tts/cognitiveservices/v1resolves theResource Not Found404 that affected custom domain endpointsEvidence
pnpm check && pnpm lint && npx tsc --noEmit)Development
Development realized by Claude Code, under supervision of Author.