From 89cb7fc9b7f9ffe444b02238d3f59ffc37e7579d Mon Sep 17 00:00:00 2001 From: swethasukumarr Date: Wed, 23 Sep 2026 14:07:11 -0400 Subject: [PATCH] Fix TTS event wire names to use camelCase --- docs/openrpc/the-spec/firebolt-open-rpc.json | 32 ++++++++++---------- src/texttospeech_impl.cpp | 16 +++++----- test/component/textToSpeechTest.cpp | 16 +++++----- test/unit/textToSpeechTest.cpp | 16 +++++----- 4 files changed, 40 insertions(+), 40 deletions(-) diff --git a/docs/openrpc/the-spec/firebolt-open-rpc.json b/docs/openrpc/the-spec/firebolt-open-rpc.json index 3b2f7b9..8ded70c 100644 --- a/docs/openrpc/the-spec/firebolt-open-rpc.json +++ b/docs/openrpc/the-spec/firebolt-open-rpc.json @@ -3490,7 +3490,7 @@ } }, { - "name": "TextToSpeech.onWillspeak", + "name": "TextToSpeech.onWillSpeak", "summary": "Text to speech conversion is about to start.", "tags": [ { @@ -3498,7 +3498,7 @@ }, { "name": "event", - "x-notifier": "TextToSpeech.onWillspeak" + "x-notifier": "TextToSpeech.onWillSpeak" }, { "name": "capabilities", @@ -3538,7 +3538,7 @@ } }, { - "name": "TextToSpeech.onSpeechstart", + "name": "TextToSpeech.onSpeechStart", "summary": "Utterance is about to be spoken.", "tags": [ { @@ -3546,7 +3546,7 @@ }, { "name": "event", - "x-notifier": "TextToSpeech.onSpeechstart" + "x-notifier": "TextToSpeech.onSpeechStart" }, { "name": "capabilities", @@ -3586,7 +3586,7 @@ } }, { - "name": "TextToSpeech.onSpeechpause", + "name": "TextToSpeech.onSpeechPause", "summary": "Ongoing speech was paused.", "tags": [ { @@ -3594,7 +3594,7 @@ }, { "name": "event", - "x-notifier": "TextToSpeech.onSpeechpause" + "x-notifier": "TextToSpeech.onSpeechPause" }, { "name": "capabilities", @@ -3634,7 +3634,7 @@ } }, { - "name": "TextToSpeech.onSpeechresume", + "name": "TextToSpeech.onSpeechResume", "summary": "Paused speech was resumed.", "tags": [ { @@ -3642,7 +3642,7 @@ }, { "name": "event", - "x-notifier": "TextToSpeech.onSpeechresume" + "x-notifier": "TextToSpeech.onSpeechResume" }, { "name": "capabilities", @@ -3682,7 +3682,7 @@ } }, { - "name": "TextToSpeech.onSpeechcomplete", + "name": "TextToSpeech.onSpeechComplete", "summary": "Speech completed successfully.", "tags": [ { @@ -3690,7 +3690,7 @@ }, { "name": "event", - "x-notifier": "TextToSpeech.onSpeechcomplete" + "x-notifier": "TextToSpeech.onSpeechComplete" }, { "name": "capabilities", @@ -3730,7 +3730,7 @@ } }, { - "name": "TextToSpeech.onSpeechinterrupted", + "name": "TextToSpeech.onSpeechInterrupted", "summary": "Speech was stopped, due to another call to speak or cancel.", "tags": [ { @@ -3738,7 +3738,7 @@ }, { "name": "event", - "x-notifier": "TextToSpeech.onSpeechinterrupted" + "x-notifier": "TextToSpeech.onSpeechInterrupted" }, { "name": "capabilities", @@ -3778,7 +3778,7 @@ } }, { - "name": "TextToSpeech.onNetworkerror", + "name": "TextToSpeech.onNetworkError", "summary": "Utterance failed due to network error.", "tags": [ { @@ -3786,7 +3786,7 @@ }, { "name": "event", - "x-notifier": "TextToSpeech.onNetworkerror" + "x-notifier": "TextToSpeech.onNetworkError" }, { "name": "capabilities", @@ -3826,7 +3826,7 @@ } }, { - "name": "TextToSpeech.onPlaybackerror", + "name": "TextToSpeech.onPlaybackError", "summary": "Utterance failed during playback.", "tags": [ { @@ -3834,7 +3834,7 @@ }, { "name": "event", - "x-notifier": "TextToSpeech.onPlaybackerror" + "x-notifier": "TextToSpeech.onPlaybackError" }, { "name": "capabilities", diff --git a/src/texttospeech_impl.cpp b/src/texttospeech_impl.cpp index 7463b5a..cf61ae2 100644 --- a/src/texttospeech_impl.cpp +++ b/src/texttospeech_impl.cpp @@ -99,47 +99,47 @@ Result TextToSpeechImpl::getSpeechState(SpeechId speechId) Result TextToSpeechImpl::subscribeOnWillSpeak(std::function&& notification) { - return subscriptionManager_.subscribe("TextToSpeech.onWillspeak", std::move(notification)); + return subscriptionManager_.subscribe("TextToSpeech.onWillSpeak", std::move(notification)); } Result TextToSpeechImpl::subscribeOnSpeechStart(std::function&& notification) { - return subscriptionManager_.subscribe("TextToSpeech.onSpeechstart", std::move(notification)); + return subscriptionManager_.subscribe("TextToSpeech.onSpeechStart", std::move(notification)); } Result TextToSpeechImpl::subscribeOnSpeechPause(std::function&& notification) { - return subscriptionManager_.subscribe("TextToSpeech.onSpeechpause", std::move(notification)); + return subscriptionManager_.subscribe("TextToSpeech.onSpeechPause", std::move(notification)); } Result TextToSpeechImpl::subscribeOnSpeechResume(std::function&& notification) { - return subscriptionManager_.subscribe("TextToSpeech.onSpeechresume", + return subscriptionManager_.subscribe("TextToSpeech.onSpeechResume", std::move(notification)); } Result TextToSpeechImpl::subscribeOnSpeechComplete(std::function&& notification) { - return subscriptionManager_.subscribe("TextToSpeech.onSpeechcomplete", + return subscriptionManager_.subscribe("TextToSpeech.onSpeechComplete", std::move(notification)); } Result TextToSpeechImpl::subscribeOnSpeechInterrupted(std::function&& notification) { - return subscriptionManager_.subscribe("TextToSpeech.onSpeechinterrupted", + return subscriptionManager_.subscribe("TextToSpeech.onSpeechInterrupted", std::move(notification)); } Result TextToSpeechImpl::subscribeOnNetworkError(std::function&& notification) { - return subscriptionManager_.subscribe("TextToSpeech.onNetworkerror", + return subscriptionManager_.subscribe("TextToSpeech.onNetworkError", std::move(notification)); } Result TextToSpeechImpl::subscribeOnPlaybackError(std::function&& notification) { - return subscriptionManager_.subscribe("TextToSpeech.onPlaybackerror", + return subscriptionManager_.subscribe("TextToSpeech.onPlaybackError", std::move(notification)); } diff --git a/test/component/textToSpeechTest.cpp b/test/component/textToSpeechTest.cpp index 4be5478..8ebd82e 100644 --- a/test/component/textToSpeechTest.cpp +++ b/test/component/textToSpeechTest.cpp @@ -143,7 +143,7 @@ TEST_F(TextToSpeechCTest, subscribeOnWillSpeak) verifyEventSubscription(id); - triggerEvent("TextToSpeech.onWillspeak", R"({ "speechid": 1 })"); + triggerEvent("TextToSpeech.onWillSpeak", R"({ "speechid": 1 })"); verifyEventReceived(mtx, cv, eventReceived); @@ -171,7 +171,7 @@ TEST_F(TextToSpeechCTest, subscribeOnSpeechStart) verifyEventSubscription(id); - triggerEvent("TextToSpeech.onSpeechstart", R"({ "speechid": 1 })"); + triggerEvent("TextToSpeech.onSpeechStart", R"({ "speechid": 1 })"); verifyEventReceived(mtx, cv, eventReceived); @@ -199,7 +199,7 @@ TEST_F(TextToSpeechCTest, subscribeOnSpeechComplete) verifyEventSubscription(id); - triggerEvent("TextToSpeech.onSpeechcomplete", R"({ "speechid": 1 })"); + triggerEvent("TextToSpeech.onSpeechComplete", R"({ "speechid": 1 })"); verifyEventReceived(mtx, cv, eventReceived); @@ -227,7 +227,7 @@ TEST_F(TextToSpeechCTest, subscribeOnSpeechPause) verifyEventSubscription(id); - triggerEvent("TextToSpeech.onSpeechpause", R"({ "speechid": 1 })"); + triggerEvent("TextToSpeech.onSpeechPause", R"({ "speechid": 1 })"); verifyEventReceived(mtx, cv, eventReceived); @@ -255,7 +255,7 @@ TEST_F(TextToSpeechCTest, subscribeOnSpeechResume) verifyEventSubscription(id); - triggerEvent("TextToSpeech.onSpeechresume", R"({ "speechid": 1 })"); + triggerEvent("TextToSpeech.onSpeechResume", R"({ "speechid": 1 })"); verifyEventReceived(mtx, cv, eventReceived); @@ -282,7 +282,7 @@ TEST_F(TextToSpeechCTest, subscribeOnSpeechInterrupted) verifyEventSubscription(id); - triggerEvent("TextToSpeech.onSpeechinterrupted", R"({ "speechid": 1 })"); + triggerEvent("TextToSpeech.onSpeechInterrupted", R"({ "speechid": 1 })"); verifyEventReceived(mtx, cv, eventReceived); @@ -310,7 +310,7 @@ TEST_F(TextToSpeechCTest, subscribeOnNetworkError) verifyEventSubscription(id); - triggerEvent("TextToSpeech.onNetworkerror", R"({ "speechid": 1 })"); + triggerEvent("TextToSpeech.onNetworkError", R"({ "speechid": 1 })"); verifyEventReceived(mtx, cv, eventReceived); @@ -338,7 +338,7 @@ TEST_F(TextToSpeechCTest, subscribeOnPlaybackError) verifyEventSubscription(id); - triggerEvent("TextToSpeech.onPlaybackerror", R"({ "speechid": 1 })"); + triggerEvent("TextToSpeech.onPlaybackError", R"({ "speechid": 1 })"); verifyEventReceived(mtx, cv, eventReceived); diff --git a/test/unit/textToSpeechTest.cpp b/test/unit/textToSpeechTest.cpp index 1802636..0d79834 100644 --- a/test/unit/textToSpeechTest.cpp +++ b/test/unit/textToSpeechTest.cpp @@ -246,7 +246,7 @@ TEST_F(TextToSpeechUTest, getSpeechState) TEST_F(TextToSpeechUTest, subscribeOnWillSpeak) { - mockSubscribe("TextToSpeech.onWillspeak"); + mockSubscribe("TextToSpeech.onWillSpeak"); auto id = ttsImpl.subscribeOnWillSpeak([](auto) {}); ASSERT_TRUE(id) << "error on subscribe "; @@ -257,7 +257,7 @@ TEST_F(TextToSpeechUTest, subscribeOnWillSpeak) TEST_F(TextToSpeechUTest, subscribeOnSpeechStart) { - mockSubscribe("TextToSpeech.onSpeechstart"); + mockSubscribe("TextToSpeech.onSpeechStart"); auto id = ttsImpl.subscribeOnSpeechStart([](auto) {}); ASSERT_TRUE(id) << "error on subscribe "; @@ -268,7 +268,7 @@ TEST_F(TextToSpeechUTest, subscribeOnSpeechStart) TEST_F(TextToSpeechUTest, subscribeOnSpeechPause) { - mockSubscribe("TextToSpeech.onSpeechpause"); + mockSubscribe("TextToSpeech.onSpeechPause"); auto id = ttsImpl.subscribeOnSpeechPause([](auto) {}); ASSERT_TRUE(id) << "error on subscribe "; @@ -279,7 +279,7 @@ TEST_F(TextToSpeechUTest, subscribeOnSpeechPause) TEST_F(TextToSpeechUTest, subscribeOnSpeechResume) { - mockSubscribe("TextToSpeech.onSpeechresume"); + mockSubscribe("TextToSpeech.onSpeechResume"); auto id = ttsImpl.subscribeOnSpeechResume([](auto) {}); ASSERT_TRUE(id) << "error on subscribe "; @@ -290,7 +290,7 @@ TEST_F(TextToSpeechUTest, subscribeOnSpeechResume) TEST_F(TextToSpeechUTest, subscribeOnSpeechComplete) { - mockSubscribe("TextToSpeech.onSpeechcomplete"); + mockSubscribe("TextToSpeech.onSpeechComplete"); auto id = ttsImpl.subscribeOnSpeechComplete([](auto) {}); ASSERT_TRUE(id) << "error on subscribe "; @@ -301,7 +301,7 @@ TEST_F(TextToSpeechUTest, subscribeOnSpeechComplete) TEST_F(TextToSpeechUTest, subscribeOnSpeechInterrupted) { - mockSubscribe("TextToSpeech.onSpeechinterrupted"); + mockSubscribe("TextToSpeech.onSpeechInterrupted"); auto id = ttsImpl.subscribeOnSpeechInterrupted([](auto) {}); ASSERT_TRUE(id) << "error on subscribe "; @@ -312,7 +312,7 @@ TEST_F(TextToSpeechUTest, subscribeOnSpeechInterrupted) TEST_F(TextToSpeechUTest, subscribeOnNetworkError) { - mockSubscribe("TextToSpeech.onNetworkerror"); + mockSubscribe("TextToSpeech.onNetworkError"); auto id = ttsImpl.subscribeOnNetworkError([](auto) {}); ASSERT_TRUE(id) << "error on subscribe "; @@ -323,7 +323,7 @@ TEST_F(TextToSpeechUTest, subscribeOnNetworkError) TEST_F(TextToSpeechUTest, subscribeOnPlaybackError) { - mockSubscribe("TextToSpeech.onPlaybackerror"); + mockSubscribe("TextToSpeech.onPlaybackError"); auto id = ttsImpl.subscribeOnPlaybackError([](auto) {}); ASSERT_TRUE(id) << "error on subscribe ";