Say with a Chime

I use the say command for a couple of alerts/notifications and would like to be able to add a chime (or any other sounder) as an attention note before the alert is spoken. Is anyone familiar with a way to implement this??

What about playSound before say(...) ?

I thought about that, but was concerned there may be too much of a delay between the two…guess I should try it.

OK…just tried it and as I assumed the delay is long…possible 2 seconds between the playSound and the say…so long as they do not feel connected as one message.

Any other suggestions?

If they are “static” messages (e.g. same sentence every time),you could record them as mp3 and append a chime beforehand, then use playSound instead of say. Quirky but should work…

Kinda defeats the purpose of the TTS and dynamic SAY command.

Unfortunately recording in advance will not work for me.

This sounds a bit too literal, but what about appending the word ding, or dong, or bing, or bong et al to the front of your message… It won’t be as fancy as the chirp from Star Trek but might do in a pinch, heh.

True…but I’m afraid a certain lag between the two commands is inevitable. Hmmm…how about you don’t use a sound but start the sentence with something like “Attention. Coffee is ready.” or “Hear ye, hear ye. I needs a reboot” :wink:

All possible options, just not the desired polished result we are looking for. I wonder if there is some way to augment the SAY command to give it an option of playing a file before speaking?

With the right programming skillz, surely. But I’d say at best you could reduce the lag. Play sound file, perform TTS processing&create mp3, stream that to sound device…

I also would like to have a chime playing before a alert is spoken, but I don’t know how.

Is anyone able to help? Thanks a lot in advance.