Link to home
Start Free TrialLog in
Avatar of Idarac
Idarac

asked on

Add voice greeting to my Access app.

I want to cbe able to add a audio voice greeting to my app to greet the user. There will be different users so I need it to be generic and address the person by username.
Avatar of shanesuebsahakarn
shanesuebsahakarn
Flag of United Kingdom of Great Britain and Northern Ireland image

SOLUTION
Avatar of bbaldwin
bbaldwin
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of stevbe
stevbe

A few yesrs back there was (and still exists) a
VoiceText 1.0 type library that made it very easy ...

    'get instance of Voice object and register it
    Set oVoice = New VTxtAuto.VTxtAuto
    oVoice.Register App.Title, App.EXEName
    oVoice.Callback = "Speak2Me.VTxtCallback"
   
    'greet user
    oVoice.Speak txtTextToSpeak, vtxtst_READING


in this example I had a text box txtTextToSpeak that I had populated with the user's name based on a lookup I did on their network logon.


You could also use the Office Agent (as opposed to the Assistant) to play with Text to speech.
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/modcore/html/deovrmicrosoftagentactivexcontrolvsofficeassistant.asp

Steve
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
If you don't already have the speech api it is a free download. but I think this is what Office uses anyway so it really should be on the PC already. Because it is a free download probably means you can include it in a delivery package to clients who do not (or might not) have it but I have not read a EULA on it so please be careful. Beyond the fun we could have with this I can see how this would be very valuable in making your application accessible to people with a vision impairment.

Steve
How are you getting the username? do you need help with that?

Steve
Steve, thanks for that - I have no idea what I will use it for but there must be something I can build into my apps that use it...heh heh :-)
beyond the sily, I think you could actually build command recognition ... "Tell Me Employee ID" and have that value read back ... you could do it at the record level ... "Read"

strSpeek = "Employee ID is " & Me.txtEmpID
strSpeek = strSpeak & ", First Name is " & Me.txtFirstName

Call myVoice.Speak strSpeak

Steve
I was thinking more along the lines of voice prompts for "dangerous" actions such as customer account deletions. Too many people simply hit "next","yes" or "ok" without actually reading what the prompt says (although I now require users to reconfirm their passwords to carry out this sort of thing).
just took a quick look at he library ... too much to grasp in 2 minutes but there is quite a bit to work with, I am sure you could get it to not only recognixze commands to make the app do something but also get it to convert speech to text and enter that in fields, and yes you can read it backm before entry :-)

Sounds like either a lot of work for 1 person or perhaps an open source project :-)

Steve
I like new stuff too much ... sometimes I distract myself :-)
"dangerous" actions such as customer account deletions.

I have tried to convince management that these type of functions shpould only be processed as part of a "year end" or "period end" process so the app does not let you orphan or delete records until you either archive or purge. I have no success to date but I mention it every time they say ... can I get that record back !!!! Interestingly enough that situation usually only happens with IT apps and none of the other divisions :-)

Steve
lol ... don't tell them just implement the voice :-)


"Initializing shout down, I mean shut down sequence"

"Does the boss really need this report?"

add a table to store random adjectives to change things for each message?

"This query is a doozy, it will take me a few minutes"
                      ^whopper, doozy, dilly, killer^


Steve
> "Does the boss really need this report?"

This one I like <G>

Or if they click "No" to the record deletion prompt:
"All customer records deleted. <pause> Just kidding...."
lol ... "Now formatting hard drive ... please wait"

but seriously ... If we extend the concept of a centralized error handler and make it a centralized message handler then you would only need to write the code in that function rather than in all of the indiviual sub/functions.

not counting the voice part, I use to write all of my code with a message handler but have since broke things up into messaging and errors ... perhaps time to re-think .... nope ...the boss will not buy into the voice thing anyway.

I used Err.Raise with custom error numbers everywhere and then looked up the message in a table to get the actual message I wanted to display. I think you could pass an argument (similar to messagebox buttons) that you can use to determine if it is a simple data validation (text instead of date, no in list, etc.) or a real error that needs to be logged.

Steve
Where is Idarac on this?? We have not heard from him since comment #1!
most of the time we never hear back from the person who originally posted the question so I wouldn't hold my breath if I was you :-)

Steve
Avatar of Idarac

ASKER

You don't have to hold your breath, I am here. If fact if you check my questions history I have engaged and awared on every question. The only deletion I have had was because of lack of expert participation.

I am keenly interested in the VoiceText library. I take it that it will take a peice of text and the sound will be based on the text. Thats exactly what I am looking for. Does anyone know where I can get it? Or how I can check if it is on my system?


Great to see so much feedback. Thanx everyone for participating.
I apologize if I sounded rude or sarcastic ... that was not my intent

my original post referred to an old library but there is a new one that I think is part of the OS now and is much easier to use. You will need to set a reference to the Microsoft Speeh Library and then use this code ... If Microsoft Speach Library is not listed in your rferences dialog box then you can get it from MS., sorry I don't have a link to a download as it was already on my PC and I did not do a specific download for it.


Public Function SayThis(MyText As String)

Dim myVoice As SpeechLib.SpVoice

Set myVoice = New SpeechLib.SpVoice
myVoice.Speak MyText

End Function

Steve
I would put the speach functions in a seperate module but you could do it directly in your startup form's Open event ...

Private Sub Form_Open(Cancel As Integer)

Dim myVoice As SpeechLib.SpVoice

Set myVoice = New SpeechLib.SpVoice
myVoice.Speak GetUserName   'GetUsername is a function to obtain the user's full name
Set myVoice = Nothing

End Sub
Ahh, I had no idea that you were looking for text to speech. I thought you were going to record a greeting as a .wav file.
Avatar of Idarac

ASKER

The text to speech works excellent!!!
Avatar of Idarac

ASKER

I am giving baldwin a 100 points for effort because I was not specific in my request.