Next we show the steps to follow to send the Voicemail with the transcription of the content. There are two ways to do it, using the Script or doing it step by step.
- Have installed VitalPBX 4 and configured the sending of Email. This is done in ADMIN/System Settings/Email Settings.
- Create an OpenAI account.
- Create OpenAI API Key
- Have root access to the VitalPBX Server
In order to create an API key in OpenAI, you need to have an account with a registered payment method. If you already have this, the next step is to go to the url:
https://platform.openai.com/
And with your OpenAI credentials you log in and in your account (upper right corner), select Manage account/API keys, and proceed to create API key. We copied it to use later.
Download the sendmail-gcloud file and copy it to /usr/sbin/
wget https://raw.githubusercontent.com/VitalPBX/vitalpbx-voicemail-transcription-openai/main/sendmail-openai /usr/sbin/
We edit the /usr/sbin/sendmail-openai file and add the API Key that we copied earlier.
nano /usr.sbin/sendmail-openai
API_KEY="" API_URL="https://api.openai.com/v1/audio/transcriptions"
Later we create the file voicemail__60-general.conf in /etc/Asterisk/vitalpbx/ with the following content.
nano /etc/asterisk/vitalpbx/voicemail__60-general.conf
Content
[general](+) ;You override the default program to send e-mail to use the script mailcmd=/usr/sbin/sendmail-openai
Now we assign the corresponding permissions
cd /usr/sbin/ chown asterisk:asterisk sendmail-openai chmod 744 sendmail-openai chmod 777 /usr/bin/dos2unix
Finally we do a reload of the voicemail module
asterisk -rx"module reload app_voicemail.so"
Overall, voicemail transcription can be a useful tool for anyone who receives voicemails regularly, and it can provide several benefits, including time savings, improved accessibility, increased accuracy, and convenience.
For more details about the implementation of Google Cloud VoiceMail Transcription, visit the following Blog:
https://vitalpbx.com/blog/vitalpbx-voicemail-transcription-with-openai/