Add repeat code

This commit is contained in:
Christopher Cookman 2024-07-31 23:19:59 -06:00
parent 5348991f2d
commit e4f9ab4f17
Signed by: ChrisChrome
GPG key ID: A023A26E42C33A42

View file

@ -110,7 +110,7 @@ function sendVerificationCode(account) {
console.error(err);
} else if (row) {
// Send verification code to phone number
runCommand(`flite -t "Hello. This is an automated call from KCA SecuriNet Monitoring. Your verification code is ${row.verification_code}" -o /tmp/${account}-code.wav`).then((output) => {
runCommand(`flite -t "Hello. This is an automated call from KCA SecuriNet Monitoring. Your verification code is ${row.verification_code}. Repeating, your code is ${row.verification_code}" -o /tmp/${account}-code.wav`).then((output) => {
runCommand(`ffmpeg -y -i /tmp/${account}-code.wav -ar 8000 -ac 1 -c:a pcm_s16le /tmp/${account}-verification.wav`).then(() => {
runCommand(`rm /tmp/${account}-code.wav`)
// strip extension from filename