Skip to content

Commit

Permalink
add quiet
Browse files Browse the repository at this point in the history
  • Loading branch information
TomasBack2Future committed Nov 30, 2024
1 parent 8dcb0a6 commit 2b8633a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion manifest.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"type": "extension",
"name": "azure_tts",
"version": "0.6.1",
"version": "0.6.1-rc",
"dependencies": [
{
"type": "system",
Expand Down
7 changes: 7 additions & 0 deletions src/main.cc
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,12 @@ class azure_tts_extension_t : public ten::extension_t {
return;
}

auto quiet = data->get_property_bool(kDataFieldQuiet.c_str());
if (quiet) {
AZURE_TTS_LOGD("input text is empty, ignored");
return;
}

text = trimString(text);
// push received text to tts queue for synthesis
if (!language_.empty() && (!prosody_.empty() || !role_.empty() || !style_.empty())) {
Expand Down Expand Up @@ -205,6 +211,7 @@ class azure_tts_extension_t : public ten::extension_t {

const std::string kCmdNameFlush{"flush"};
const std::string kDataFieldText{"text"};
const std::string kDataFieldQuiet{"quiet"};
const std::string kDataFieldSSML{"ssml"};
};

Expand Down

0 comments on commit 2b8633a

Please sign in to comment.