remove tier prop from deepgram

This commit is contained in:
Dave Horton committed 2024-02-10 15:13:27 -05:00
1 parent d94b252504
commit 35ab8089a7
1 file changed
+2 -8
@@ -32,12 +32,7 @@ namespace {
static unsigned int idxCallCount = 0; static unsigned int idxCallCount = 0;
static uint32_t playCount = 0; static uint32_t playCount = 0;
/* deepgram model / tier defaults by language */ /* deepgram model defaults by language */
struct LanguageInfo {
std::string tier;
std::string model;
};
static const std::unordered_map<std::string, std::string> languageLookupTable = { static const std::unordered_map<std::string, std::string> languageLookupTable = {
{"zh", "base"}, {"zh", "base"},
{"zh-CN", "base"}, {"zh-CN", "base"},
@@ -148,7 +143,6 @@ namespace {
const char *var ; const char *var ;
const char *model = switch_channel_get_variable(channel, "DEEPGRAM_SPEECH_MODEL"); const char *model = switch_channel_get_variable(channel, "DEEPGRAM_SPEECH_MODEL");
const char *customModel = switch_channel_get_variable(channel, "DEEPGRAM_SPEECH_CUSTOM_MODEL"); const char *customModel = switch_channel_get_variable(channel, "DEEPGRAM_SPEECH_CUSTOM_MODEL");
const char *tier = switch_channel_get_variable(channel, "DEEPGRAM_SPEECH_TIER") ;
std::ostringstream oss; std::ostringstream oss;
oss << "/v1/listen?"; oss << "/v1/listen?";
@@ -160,7 +154,7 @@ namespace {
oss << "&model=" << defaultModel; oss << "&model=" << defaultModel;
} }
else { else {
oss << "tier=base&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;