Compare commits

...

2 Commits

Author SHA1 Message Date
Dave Horton 4a7ce3fdf8 fix path syntax 2024-05-10 14:14:20 -04:00
Hoan Luu Huu b019a634bd Fix playht timeout while downloading audio (#61)
Signed-off-by: Quan HL <quan.luuhoang8@gmail.com>
2024-05-10 12:18:32 -04:00
2 changed files with 5 additions and 4 deletions
@@ -162,14 +162,14 @@ namespace {
if (!model && !customModel) { if (!model && !customModel) {
std::string defaultModel; std::string defaultModel;
if (getLanguageInfo(language, defaultModel)) { if (getLanguageInfo(language, defaultModel)) {
oss << "&model=" << defaultModel; oss << "model=" << defaultModel;
} }
else { else {
oss << "model=base"; // most widely supported, though not ideal oss << "model=base"; // most widely supported, though not ideal
} }
} }
else if (model) oss << "&model=" << model; else if (model) oss << "model=" << model;
else if (customModel) oss << "&model=" << customModel; else if (customModel) oss << "model=" << customModel;
if (var = switch_channel_get_variable(channel, "DEEPGRAM_SPEECH_MODEL_VERSION")) { if (var = switch_channel_get_variable(channel, "DEEPGRAM_SPEECH_MODEL_VERSION")) {
oss << "&version"; oss << "&version";
+2 -1
View File
@@ -76,7 +76,8 @@ static CURL* createEasyHandle(void) {
// set connect timeout to 3 seconds and total timeout to 109 seconds // set connect timeout to 3 seconds and total timeout to 109 seconds
curl_easy_setopt(easy, CURLOPT_CONNECTTIMEOUT_MS, 3000L); curl_easy_setopt(easy, CURLOPT_CONNECTTIMEOUT_MS, 3000L);
curl_easy_setopt(easy, CURLOPT_TIMEOUT, 10L); //For long text, PlayHT took more than 20 seconds to complete the download.
curl_easy_setopt(easy, CURLOPT_TIMEOUT, 60L);
return easy ; return easy ;
} }