Speech Recognition SDK ActiveX Control

Speech Recognition SDK ActiveX Control

Platform : Windows 11, Windows 10, Windows 8, Vista, XP

Speech Recognition SDK ActiveX Control let your application support multiple languages and voices,convert text to speech or wave file, without the need to send data to a server

Popular Solution Go   Back

MS Access 2016 - How to Convert text to speech

Step 1: To install the Speech Recognition SDK ActiveX, begin by launching the setup file (http://www.viscomsoft.com/demo/speechrecognitiondemosetup.exe). Select the desired installation folder for the
Speech Recognition SDK ActiveX and continue with the installation on your development computer.

Step 2: Launch MS Access 2016. select Blank database.


Step 3: Select Create Tab, select Form Design.

Step 4: In Form, Select ActiveX Control. Select SpeechRecognition Control.

Step 5: Resize the Speech Recognition Control on form and add the following UI on form.(1 combo box, 1 textbox control)



Step 6: Select Combo Box, select Row Source Type property, set to Value List.

Step 7: Select Text Box, select Sroll Bars property, set to Vertical and set Name property to txtText.

Step 8: In Form load event , add the following code

Private Sub Form_Load()
Dim obj As SpeechRecognition
Set obj = Me.SpeechRecognition0.Object
obj.InitControl
iCount = obj.GetVoiceCount
For i = 0 To iCount-1
  Me.Combo1.AddItem obj.GetVoiceName(i)
Next
 
End Sub

Step 9: In Speak button click event , add the following code

Private Sub Command5_Click()
Dim obj As SpeechRecognition
Set obj = Me.SpeechRecognition0.Object
obj.SetSelectedVoice Me.Combo1.ListIndex
obj.Speak (txtText.Value)
End Sub

Step 10: In SpeechRecognition0 , add Speak Complete event, display Message Box when speak completed.

Private Sub SpeechRecognition0_SpeakComplete()
MsgBox "Speak Completed"
End Sub

Step 11: In left hand size, Right click the Form1, then select "Open" menu item to run the form. Select the voice, enter the text, then click Speak button.




Download the source code of the Text to Speech Sample