The Speech Application Programming Interface (SAPI) is an API developed by Microsoft to allow the use of speech recognition and speech synthesis within Windows applications. SAPI has been shipped as a part of the Windows operating system. Microsoft Office, Microsoft Agent and many Vovsoft programs use SAPI 5.
The aim of this article is to provide assistance in identifying and resolving typical issues associated with voice engines and the Microsoft Speech API (SAPI).
This error message indicates that there is an issue with the sapi.dll file or the registry entries associated with SAPI.
The sapi.dll file is typically located in the "C:\Windows\System32\Speech\Common" folder.
This command may help fixing the issue:
If no voices are detected on your system, this error message will appear. A reboot may fix this, and it is also possible that reinstalling your display languages and voices may help with the error.
This issue is usually associated with virus scanners and/or firewalls, and some users have reported encountering it with Nod32 antivirus and Lavasoft Personal Firewall.
This problem normally indicates a problem with the directory structure of voices.
This problem normally indicates a problem with the directory structure of voices.
If you see this error on Windows 8, Windows 10, Windows 11 when using Microsoft voices, the problem generally has to do with some corrupt registry entries for the Microsoft voices.
Check the registry entries:
HKLM:\SOFTWARE\Microsoft\Speech_OneCore\Voices\Tokens | OneCore voices |
HKLM:\SOFTWARE\WOW6432Node\Microsoft\Speech\Voices\Tokens | For 32-bit apps |
HKLM:\SOFTWARE\Microsoft\Speech\Voices\Tokens | For 64-bit apps |
When enumerating items, the requested index is greater than the count of items.
The first thing to check for this problem is for syntax errors related to using XML tags. If you're using XML tags in the text to change voices, make sure that start and end tags are paired correctly, and there are no extra end tags in the text.
The correct use of XML for silence: