Add ability for directory to use mod_flite or mod_cepstral (#1644)

This commit is contained in:
Chris Black
2016-06-10 16:07:11 -06:00
committed by FusionPBX
parent 2cbc5f34f3
commit cfc20ca9bf
+26
View File
@@ -54,6 +54,16 @@
storage_type = settings['voicemail']['storage_type']['text']; storage_type = settings['voicemail']['storage_type']['text'];
end end
end end
if (settings['voicemail']['speak_mod'] ~= nil) then
if (settings['voicemail']['speak_mod']['text'] ~= nil) then
speak_mod = settings['voicemail']['speak_mod']['text'];
end
end
if (settings['voicemail']['speak_voice'] ~= nil) then
if (settings['voicemail']['speak_voice']['text'] ~= nil) then
speak_voice = settings['voicemail']['speak_voice']['text'];
end
end
if (settings['voicemail']['storage_path'] ~= nil) then if (settings['voicemail']['storage_path'] ~= nil) then
if (settings['voicemail']['storage_path']['text'] ~= nil) then if (settings['voicemail']['storage_path']['text'] ~= nil) then
storage_path = settings['voicemail']['storage_path']['text']; storage_path = settings['voicemail']['storage_path']['text'];
@@ -239,12 +249,20 @@
session:streamFile(file_location); session:streamFile(file_location);
else else
--announce the first and last names --announce the first and last names
if (speak_mod ~= nil and speak_voice ~= nil) then
session:execute("speak",speak_mod.."|"..speak_voice.."|"..row.first_name);
else
session:execute("say", "en name_spelled iterated "..row.first_name); session:execute("say", "en name_spelled iterated "..row.first_name);
end
--session:execute("sleep", "500"); --session:execute("sleep", "500");
if (row.last_name ~= nil) then if (row.last_name ~= nil) then
if (speak_mod ~= nil and speak_voice ~= nil) then
session:execute("speak",speak_mod.."|"..speak_voice.."|"..row.last_name);
else
session:execute("say", "en name_spelled iterated "..row.last_name); session:execute("say", "en name_spelled iterated "..row.last_name);
end end
end end
end
end); end);
elseif (storage_type == "http_cache") then elseif (storage_type == "http_cache") then
file_location = storage_path.."/"..row.extension.."/recorded_name.wav"; file_location = storage_path.."/"..row.extension.."/recorded_name.wav";
@@ -259,13 +277,21 @@
session:streamFile(voicemail_dir.."/"..row.extension.."/recorded_name.wav"); session:streamFile(voicemail_dir.."/"..row.extension.."/recorded_name.wav");
else else
--announce the first and last names --announce the first and last names
if (speak_mod ~= nil and speak_voice ~= nil) then
session:execute("speak",speak_mod.."|"..speak_voice.."|"..row.first_name);
else
session:execute("say", "en name_spelled iterated "..row.first_name); session:execute("say", "en name_spelled iterated "..row.first_name);
end
if (row.last_name ~= nil) then if (row.last_name ~= nil) then
--session:execute("sleep", "500"); --session:execute("sleep", "500");
if (speak_mod ~= nil and speak_voice ~= nil) then
session:execute("speak",speak_mod.."|"..speak_voice.."|"..row.last_name);
else
session:execute("say", "en name_spelled iterated "..row.last_name); session:execute("say", "en name_spelled iterated "..row.last_name);
end end
end end
end end
end
--announce the extension number --announce the extension number
if (row.directory_exten_visible == "false") then if (row.directory_exten_visible == "false") then