diff --git a/lib/middleware.js b/lib/middleware.js index cf1b07e1..7e1d37e3 100644 --- a/lib/middleware.js +++ b/lib/middleware.js @@ -332,7 +332,7 @@ module.exports = function(srf, logger) { } // Resolve application.speech_synthesis_voice if it's custom voice - if (app2.speech_synthesis_vendor === 'google' && app2.speech_synthesis_voice.startsWith('custom_')) { + if (app2.speech_synthesis_vendor === 'google' && app2.speech_synthesis_voice?.startsWith('custom_')) { const arr = /custom_(.*)/.exec(app2.speech_synthesis_voice); if (arr) { const google_custom_voice_sid = arr[1];