"Cannot set voice. No matching voice is installed or the voice was disabled"

If Microsoft.Speech.Synthesis.SpeechSynthesizer.SelectVoice(String name) raises ArgumentException with Message property “Cannot set voice. No matching voice is installed or the voice was disabled.” then make sure that the version number of Microsoft.Speech.dll matches the version of language packs you have installed.

speech_dll.png
language_pack.PNG

The major and minor numbers are important; build and update pack numbers are not relevant.

Microsoft.Speech.dll Language pack
UCMA 3.0 10.2.xxxx.yyy 10.2.xxxx.yyy
UCMA 4.0 11.0.xxxx.yyy 11.0.xxxx.yyy

It is very easy to run into a situation when you face the ArgumentException mentioned above since

  • Microsoft.Speech.dll is distributed as part of the UCMA
  • language packs should be downloaded and deployed separately
  • and language packs belonging to UCMA 3.0 and 4.0 have identical file and display names

So, make sure you are deploying the right language packs; the ones which are compatible with your speech SDK/runtime.