Make voicemail hints case insensitive (#1007)

This commit is contained in:
RJ Burnham
2024-12-13 18:42:29 +00:00
committed by GitHub
parent 5e04db82bf
commit f37e1540ee

View File

@@ -153,7 +153,7 @@ class Amd extends Emitter {
const wordCount = t.alternatives[0].transcript.split(' ').length; const wordCount = t.alternatives[0].transcript.split(' ').length;
const final = t.is_final; const final = t.is_final;
const foundHint = hints.find((h) => t.alternatives[0].transcript.includes(h)); const foundHint = hints.find((h) => t.alternatives[0].transcript.toLowerCase().includes(h.toLowerCase()));
if (foundHint) { if (foundHint) {
/* we detected a common voice mail greeting */ /* we detected a common voice mail greeting */
this.logger.debug(`Amd:evaluateTranscription: found hint ${foundHint}`); this.logger.debug(`Amd:evaluateTranscription: found hint ${foundHint}`);