Voice to text message app

RCCradio

Customer
Joined
Dec 11, 2020
Messages
65
Reaction score
37
hello,
I've updated my Voice message to text message CFD App. With this app, a caller can record a message that will be transcribed and sent as a text message to numbers you specify in a txt file. This CFD app uses the https://www.clicksend.com API to send the message. You can specify a customer audio message when the caller connects, and use a simple .txt file to store the numbers you want the message to send to.

The .txt file needs to be saved in the Callflows folder for the app , i.e. "C:\ProgramData\3cx\Instance1\Data\Ivr\Prompts\Callflows\jltest2\617.txt"
I named it as the extension it was used for. This is in the "Disconnect Handler Flow" tab, in the "ReadWriteFile1" option.
txtfile.jpg
You'll need to have a ClickSend account, and then you can put your API info in the 'HTTP Request:" Option, click the expression builder icon for teh "Content", and modify the first Constant string with your user name and API key.
api.jpg
 

Attachments

Hello @RCCradio,

Are you having any issue with this app? Or just sharing it?
 
I am sharing it. I'm adding an function to also send an email with he audio recording attached, so once I know it's working I'll attach it here as well.
 
Thanks for that!
 
I had to make some changes to my CFD app. If someone left a voice recording longer than 60 seconds it would error out on the transcription, and no message would be sent. Also found out that CFD Record function, overwrites the audio file, but the size of the audio file doesn't change. i.e. had a person leave a 60 second recording, 938kB. if the person called back and left a 6 second recording, the file size would still be 938kB, which would cause the google API to error out thinking it was longer than 60 seconds.

So I've added error handling in, for when the caller records for more than 1 minute, but also added in to delete the recording at the end of the CFD script.
 

Attachments

Also found out that CFD Record function, overwrites the audio file, but the size of the audio file doesn't change. i.e. had a person leave a 60 second recording, 938kB. if the person called back and left a 6 second recording, the file size would still be 938kB, which would cause the google API to error out thinking it was longer than 60 seconds.
This is because you're specifying always the same file name. You should use a different file name each time, otherwise you will have issues with simultaneous calls.
 
This is because you're specifying always the same file name. You should use a different file name each time, otherwise you will have issues with simultaneous calls.
It uses the "session.ani" as part of the filename, so wouldn't have an issue with simultaneous calls, just if that person calls again. But not sure why the file size doesn't change to the match what it should be.
 
It uses the "session.ani" as part of the filename, so wouldn't have an issue with simultaneous calls, just if that person calls again. But not sure why the file size doesn't change to the match what it should be.
Yes, the file should be truncated in that case. You can add a C# script to remove the file if it's there just before starting the recording.
 
  • Like
Reactions: Evolute IT
Used edossantos_sipCaller suggestion and added the delete file at the start of the CFP as well.
Also, found an issue if you use the text-to-speech function for the Record message, it does all kinds of weird stuff, including constantly clearing cache.
If you want to use this, let it run the first time, and it will create a temp wav file with the text-to-speech, so you can rename them and just link to the audio file instead.
 

Attachments

For the phone numbers and email address
Just put the cell number(s) in the phone.txt, starting with country code and separated by comma, ie +15555555555,+15555555556
You can put emails in the email file the same.
These files will have to be copied to your servers callflow folder, each CFD will create it's own folder/subfolders.
 
Thanks for sharing the updated version!
 

Latest Posts

Forum statistics

Threads
111,973
Messages
590,074
Members
164,895
Latest member
jasonkkrause