[BUG] speech tts synthesize rejects valid locales such as fil-PH, yue-CN and sr-Latn-RS in --language
Maintainers usually reply within 2 days
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 78/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- azure, csharp
- Domain
- backend-api-design
Research direction
Start in tools/Azure.Mcp.Tools.Speech/src/Commands/Tts/TtsSynthesizeCommand.cs and compare its --language validation with LocaleSupport.cs and the sibling STT command. Add or adapt a TtsSynthesizeCommandTests case using a mocked ISpeechService to check valid locales pass and malformed values are rejected. Done means the supplied valid examples reach the service while malformed values still fail validation.
Written by the indexing model from the issue text.
Description
Describe the bug
speech tts synthesize rejects valid Azure AI Speech text to speech locales in --language.
tools/Azure.Mcp.Tools.Speech/src/Commands/Tts/TtsSynthesizeCommand.cs validates --language with ^[a-z]{2}-[A-Z]{2}$. That only allows a two-letter language and a two-letter region, so locales with a three-letter language code, a script subtag or a dialect suffix fail validation with 400 before the service is called. Examples: fil-PH, yue-CN, wuu-CN, sr-Latn-RS, zh-CN-sichuan. These are listed in the Speech service language support docs (https://learn.microsoft.com/azure/ai-services/speech-service/language-support?tabs=tts).
The sibling speech stt recognize command accepts the same locales; LocaleSupport.cs in the same area lists fil-PH, yue-CN, wuu-CN, zh-CN-shandong and zh-CN-sichuan.
Expected behavior
--language fil-PH (or yue-CN, wuu-CN, sr-Latn-RS, zh-CN-sichuan) passes validation and is sent to the service, the same as en-US. Malformed values such as invalid, en_US or EN-US are still rejected.
Actual behavior
The command returns 400 with Language must be in format 'xx-XX' (e.g., 'en-US', 'es-ES'). Got: fil-PH and never calls the service.
Reproduction Steps
azmcp speech tts synthesize --endpoint https://example.cognitiveservices.azure.com/ --text "Magandang umaga" --outputAudio out.wav --language fil-PH
Validation fails before any request is made, so no Azure resource or credential is needed to see it. A unit test in TtsSynthesizeCommandTests that passes --language fil-PH with a mocked ISpeechService and asserts 200 fails on current main.
Environment
- Current
main(940504c) - Ubuntu 24.04, .NET SDK 10.0.403
- Dominant language
- C#
- Stars
- 3.9k
- Forks
- 689
- Avg merge
- 2d 11h
- Merged PRs (30d)
- 143
Getting set up
Starts the project's dev container in your browser, under your own GitHub account.
- Ships a Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from microsoft/mcp
-
[BUG] deploy architecture diagram generate never shows Docker settings for container appsPossibly taken @Shizoqua claimed this today. OpenAzure.Mcp.Server needs-triage
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
Maintainers usually reply within 2 days
-
[BUG] Single mode: an unknown tool name fails with "An error occurred invoking 'azure'" instead of listing the available toolsPossibly taken @Ahmed-Manai claimed this 9 days ago. Openserver-Azure.Mcp
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 2 days
-
[BUG] pricing get drops tierMinimumUnits, so tiered meters return same-meter prices with no thresholdPossibly taken @msalaman claimed this 29 days ago. Opencustomer-reported needs-team-triage question server-Azure.Mcp tools-Price tools-Pricing
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
microsoft/mcp#4087 · 1 comment · 1 assignee ·
Maintainers usually reply within 2 days
-
[Doc Gap] README.md still shows removed "Basic" resilience usage plan tier after GA SDK updateMay be free again @anishsinghhh3-bit claimed this 32 days ago, and no pull request is open. Opencopilot documentation server-Azure.Mcp tools-ResilienceManagement
Difficulty 1/5 Under an hour Newbie friendliness 86/100
microsoft/mcp#4008 · 2 comments ·
Maintainers usually reply within 2 days
-
[Doc Gap] Azure Backup protect/update-protection/undelete docs missing new `OperationId` field and updated `JobId` semanticsMay be free again @akhil9tiet claimed this 50 days ago, and no pull request is open. Opencopilot documentation server-Azure.Mcp tools-AzureBackup
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
microsoft/mcp#3962 · 1 comment ·
Maintainers usually reply within 2 days
Similar issues
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
Project dependencies are outdatedPossibly taken @yasmoradi claimed this today. Opendependencies
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
bitfoundation/bitplatform#15616 ·
Maintainers usually reply within 1 day
-
:watch: Not Triaged Pri3
Difficulty 1/5 Under an hour Newbie friendliness 91/100
Maintainers usually reply within 1 day
-
area-controls-shell platform/android
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
dotnet/maui#41304 · 1 reaction ·
Maintainers usually reply within 1 day
-
area-ItemsRepeater needs-triage team-Controls
Difficulty 2/5 1-3 hours Newbie friendliness 67/100
microsoft/microsoft-ui-xaml#12986 · 2 comments ·
Maintainers usually reply within 3 days