Applications that are developed based on Speech Application Programming Interface (SAPI) version 5.1 require that you install the SAPI 5.1 core component on the client computer.
Have you insured that SAPI is installed?
ynot8669
ASKER
I have not installed any SAPI SDK. Windows 7 and 8 just worked with a very simple VBA script. It has just stopped working after the Win 8.1 upgrade.
I do not really want to install extra software on all of the user PC's.
I have included the reference to C:\windows\system32\Speech\Common\sapi.dll
and physically checked that the dll is present ...it is
Microsoft delivers various backward incompatible SAPI versions without any warning...
So the programs working with SAPI 4 can stop working on computers having SAPI 5 etc.
To ensure the functionality you really have to install the SAPI version which is compatible with your program or install the appropriate SAPI version on the target computer.
A workaround is to play some WAW sound instead of TTS synthesis.
Boyd (HiTechCoach) Trimmell, Microsoft Access MVP 2010-2015
ynot8669,
To verify it is not a version issue:
Open the folder: C:\windows\system32\Speech\Common\
Right click on the sapi.dll file and select properties. Click the Details tab. There you will find the File Version. Compare the Windows 8.1 version and your version. If they are not the same version then that is probably the issue.
Have you tyied converting your code to Late Binding?
ynot8669
ASKER
My Win 8 PC is using 5.3.15125 and
Win 8.1 is using 5.3.16513
After some debugging I found that the error is related to something Audio. The voice was used behind a Logon Screen and the error was also causing the modal popup to disappear.
This might be something to do with using two screens but again this worked prior to the upgrade.
I found this code to test for SAPI Presence and added the error:
Private Sub Form_Load()
Dim RC, myGrammar, gSAPIPresent
On Error GoTo SAPINotFound
Set RC = New SpSharedRecoContext
Set myGrammar = RC.CreateGrammar
myGrammar.DictationSetState SGDSActive
gSAPIPresent = True
Exit Sub
SAPINotFound:
If Err.Number = 459 Then
MsgBox "SAPI not found"
ElseIf Err.Number = -2147200904 Then 'SPERR_AUDIO_NOT_FOUND whatever that might be
Else
MsgBox "Error encountered : " & Err.Number
End If
gSAPIPresent = False
End Sub
My issue is with the SPERR_AUDIO, I have maximized the logon form ...looks silly but with the above code and a screen maximise the speech works fine.
I will move to another 8.1 machine and see if it's my set-up or common accross machines.
It seems to be an issue on my main set-up or subtle difference between Office 2013 and 2010. The issue setup in Office 2010 and my other PC is Office 2013 which reconfigured itself on first launch and worked unaltered and as expected.