Excellent presentation showing how to use Text-to-Speech, TTS, in Access using VBA by David Nealey and Alessandro Grimaldi.
David demonstrates practical uses using speech on forms and reports to cover the five W's: Who, What, When, Where, and Why. The VBA code is simple using a Microsoft Speech library to make Access read information aloud that tells a story about the data.
Download David's presentation. Check Downloads folder.
https://accessusergroups.org/lunch/wp...
Alessandro goes into depth about controlling speech with VBA using a class to be an intermediary between the Windows Library and the form to enter text to speak, start, pause, and stop reading, control its volume, change its speed, and change voices. Flags to be asynchronous, empty the buffer with speech, and what the buffer is.
He explains the difference between the Microsoft Speech Object Library references with different DLL files.
Alessandro shows how to edit the registry (REGEDIT) to copy voices from a larger set reserved for the system (like Cortana) so they can be used by applications like Access using the easier speech library.
Download database used for Alessandro's demonstration.
ACCDB file with Form1 and clsSpeech class module:
https://alessandrogrimaldi.com/public...
Adrian Bell and Colin Riddington also add knowledge from their experiences using speech.
01:00 new MVP is Colin
02:10 Welcome by Maria Barnes
02:30 introduce David Nealey
04:15 David's presentation
24:38 introduce Alessandro Grimaldi
25:44 Alessandro's presentation
26:20 Speech is built into the Excel Application but
27:33 Access doesn't have this method for Application
28:55 sample form in Access (Form1) with:
text box to enter speech
buttons to change the volume, change the speed, pause, resume, and stop the reading
combo box to select one of the voices in the computer (the hardest part)
29:39 start the reading
30:08 Class is an intermediary between the form and the Windows Library
30:45 VBA code
31:19 References
31:29 two different DLLs for Microsoft Speech Object Library
34:25 Flags to set like async so other commands can be issued in the meantime, and purge before speak to prevent an overlapping of 2 voices.
35:01 other Flags
35:58 list of available voices on the form. To understand how the combo box works, look at the Windows Registry.
36:18 Two keys we are interested in. First is Speech_OneCore. Voices and Tokens.
36:55 Use the Windows Language Settings to install a language package with voices
38:05 go back to the registry, refresh, see new voice tokens
38:27 2nd registry key is Speech, doesn't have all the voices.
39:12 Windows Vocal Assistant has full set of voices taken from speech OneCore
39:35 Access application doesn't show all the voices
Combo box loaded using GetVoices method of the class and returns a 2-dimensional array using getVoices from the API. Example Registry key in comments
41:06 export registry key for voice token to a file, edit the file, change Speech_OneCore to Speech in 2 places where registry key is written, save and close. Run the REG file to add voice to the Speech library.
42:33 combo box in Access shows the new voices. Getting REG files from other places not recommended.
44:00 VBA Pill playlist on YouTube
, Microsoft page for Speech API Overview (SAPI)
, Structure of the Registry
44:50 Questions and Comments
48:05 thanks from Adrian for making the differentiation clear, and a solution when other ask why voices aren't available
48:48 Colin comment about the 2 speech libraries. Speech OneCore used in Accessibility
51:10 Eric posted link for Speech, voice, and conversation in Windows 11 and Windows 10, and commented about SAPI and OneCore, Speech SDK
52:42 Maria, wonder what Excel uses
55:05 Duane's presentation NEXT
---
Using Text-to-Speech TTS in Access, by David Nealey and Alessandro Grimaldi
Access Lunchtime
Tuesday 27 September, 2022
Links from Alessandro:
Speech API Overview (SAPI 5.3) -- edit link to add closing )
https://learn.microsoft.com/en-us/pre...)
Structure of the Registry
https://learn.microsoft.com/en-us/win...
VBA Pills playlist by Alessandro
• VBA Pills
VBA Pill #17: Make Office talk! (1:01)
• VBA Pill #17: Make Office talk!
from Eric:
Speech, voice, and conversation in Windows 11 and Windows 10
https://learn.microsoft.com/en-us/win...
Next!
Tuesday 25 October 2022, at 12 noon Central time
Embedding a Table of Contents into a Report
by Duane Hookom
https://accessusergroups.org/lunch/ev...
AccessUserGroups.org
Access Lunchtime chapter host Maria Barnes
Last Tuesday @ noon Central time CT -- join us!
https://accessusergroups.org/lunch/
✓ Join our free online Access User Groups