mirror of
https://github.com/fusionpbx/fusionpbx.git
synced 2025-12-30 09:03:49 +00:00
Same as 4.2 (#2898)
This commit is contained in:
committed by
FusionPBX
parent
5f6a877ea8
commit
dea1bf390c
@@ -70,15 +70,23 @@
|
||||
if (debug["info"]) then
|
||||
freeswitch.consoleLog("notice", "[voicemail] CMD: " .. transcribe_cmd .. "\n");
|
||||
freeswitch.consoleLog("notice", "[voicemail] RESULT: " .. transcribe_result .. "\n");
|
||||
freeswitch.consoleLog("notice", "[voicemail] TRANSCRIPTION: " .. transcribe_json["results"][1]["name"] .. "\n");
|
||||
freeswitch.consoleLog("notice", "[voicemail] CONFIDENCE: " .. transcribe_json["results"][1]["confidence"] .. "\n");
|
||||
if (transcribe_json["results"][1]["name"] == nil) then
|
||||
freeswitch.consoleLog("notice", "[voicemail] TRANSCRIPTION: (null) \n");
|
||||
else
|
||||
freeswitch.consoleLog("notice", "[voicemail] TRANSCRIPTION: " .. transcribe_json["results"][1]["name"] .. "\n");
|
||||
end
|
||||
if (transcribe_json["results"][1]["confidence"] == nil) then
|
||||
freeswitch.consoleLog("notice", "[voicemail] CONFIDENCE: (null) \n");
|
||||
else
|
||||
freeswitch.consoleLog("notice", "[voicemail] CONFIDENCE: " .. transcribe_json["results"][1]["confidence"] .. "\n");
|
||||
end
|
||||
end
|
||||
|
||||
transcription = transcribe_json["results"][1]["name"];
|
||||
transcription = transcription:gsub("<profanity>.*<%/profanity>","...");
|
||||
confidence = transcribe_json["results"][1]["confidence"];
|
||||
return transcription;
|
||||
end
|
||||
return transcription;
|
||||
end
|
||||
else
|
||||
if (debug["info"]) then
|
||||
|
||||
Reference in New Issue
Block a user