Solved

Text to Speech Using SAPI in Access

Posted on 2014-01-02
9
1,105 Views
Last Modified: 2014-01-13
Hi,

I had a small spoken welcome message in my access application using SAPI text to speech. It was all working fine until I upgraded to Windows 8.1.

I have included the reference in tool to the "Windows Speech object" but still get the error 429 Activex can't create the object.

What do I need to do to get this working again?
0
Comment
Question by:ynot8669
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 6
  • 2
9 Comments
 

Author Comment

by:ynot8669
ID: 39752903
Forgot to mention I am using Access 2010
0
 
LVL 21
ID: 39752952
I don't think it is an Access issue but an issue with  installing SAPI.

From: How to redistribute SAPI 5.1 core components
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?
0
 

Author Comment

by:ynot8669
ID: 39752978
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
0
Ransomware: The New Cyber Threat & How to Stop It

This infographic explains ransomware, type of malware that blocks access to your files or your systems and holds them hostage until a ransom is paid. It also examines the different types of ransomware and explains what you can do to thwart this sinister online threat.  

 
LVL 42

Expert Comment

by:pcelba
ID: 39753265
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.
0
 
LVL 21
ID: 39754650
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?
0
 

Author Comment

by:ynot8669
ID: 39755472
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.
0
 

Author Comment

by:ynot8669
ID: 39755803
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.
0
 

Accepted Solution

by:
ynot8669 earned 0 total points
ID: 39767185
The problem has been self solved. I removed the On Load event and changed the form auto centering property to NO. It seems that using two screen centered the modal/popup in between both screens ...that is not visible on either.

Am unsure as to why this only occurred after the Win8.1 update, but for now I'll blame the upgrade.
0
 

Author Closing Comment

by:ynot8669
ID: 39776124
Self Solved and actual cause only presumed.
0

Featured Post

Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article describes how to import an Outlook PST file to Office 365 using a third party product to avoid Microsoft's Azure command line tool, saving you time.
This article helps those who get the 0xc004d307 error when trying to rearm (reset the license) Office 2013 in a Virtual Desktop Infrastructure (VDI) and/or those trying to prep the master image for Microsoft Key Management (KMS) activation. (i.e.- C…
The viewer will learn how to create two correlated normally distributed random variables in Excel, use a normal distribution to simulate the return on different levels of investment in each of the two funds over a period of ten years, and, create a …
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
Suggested Courses

617 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question