unsigned char final_buffer[2] = {'\0', };
for (const auto& observer : mObservers) {
if (observer) {
+ MWR_LOGI("No FINISH event sent yet, adding to finalize streaming session");
if (!observer->on_streaming_audio_data(
MAS_SPEECH_STREAMING_EVENT_FINISH, final_buffer, sizeof(final_buffer))) {
LOGE("[Recorder WARNING] One of the observer returned false");
void CAudioManager::finalize_audio_data()
{
+ MWR_LOGI("Adding FINISH event to audio data list");
unsigned char final_buffer[2] = {'\0', };
mas_speech_data speech_data;
speech_data.event = MAS_SPEECH_STREAMING_EVENT_FINISH;
void CAudioManager::start_streaming_current_utterance_data(long long start_time)
{
+ MWR_LOGI("[ENTER]");
if (mStreamingThread.joinable()) {
MWR_LOGE("ERROR : mStreamingThread is joinable, will not start a new thread");
return;
void CAudioManager::stop_streaming_current_utterance_data()
{
+ MWR_LOGI("[ENTER]");
if (mStreamingThread.joinable()) {
MWR_LOGD("mStreamingThread is joinable, trying join()");
mStopStreamingThread.store(true);
void CAudioManager::start_streaming_previous_utterance_data()
{
+ MWR_LOGI("[ENTER]");
if (mStreamingPreviousThread.joinable()) {
MWR_LOGE("ERROR : mStreamingPreviousThread is joinable, will not start a new thread");
return;
void CAudioManager::stop_streaming_previous_utterance_data()
{
+ MWR_LOGI("[ENTER]");
if (mStreamingPreviousThread.joinable()) {
MWR_LOGD("mStreamingPreviousThread is joinable, trying join()");
mStopStreamingPreviousThread.store(true);
void CAudioManager::start_streaming_follow_up_data()
{
+ MWR_LOGI("[ENTER]");
if (mStreamingThread.joinable()) {
MWR_LOGE("ERROR : mStreamingThread is joinable, will not start a new thread");
return;
void CAudioManager::stop_streaming_follow_up_data()
{
+ MWR_LOGI("[ENTER]");
if (mStreamingThread.joinable()) {
MWR_LOGD("mStreamingThread is joinable, trying join()");
mStopStreamingThread.store(true);
unsigned char final_buffer[2] = {'\0', };
for (const auto& observer : mObservers) {
if (observer) {
+ MWR_LOGI("No FINISH event sent yet, adding to finalize streaming session");
if (!observer->on_streaming_audio_data(
MAS_SPEECH_STREAMING_EVENT_FINISH, final_buffer, sizeof(final_buffer))) {
LOGE("[Recorder WARNING] One of the observer returned false");
void CWakeupEngineManager::start_streaming_current_utterance_data()
{
+ MWR_LOGI("[ENTER]");
if (mStreamingThread.joinable()) {
MWR_LOGE("ERROR : mStreamingThread is joinable, will not start a new thread");
return;
void CWakeupEngineManager::stop_streaming_current_utterance_data()
{
+ MWR_LOGI("[ENTER]");
if (mStreamingThread.joinable()) {
MWR_LOGD("mStreamingThread is joinable, trying join()");
mStopStreamingThread.store(true);
mas_speech_streaming_event_e event, void* buffer, unsigned int len)
{
if (MAS_SPEECH_STREAMING_EVENT_START == event) {
- MWR_LOGD("streaming_cb START");
+ MWR_LOGI("streaming_cb START");
}
if (MAS_SPEECH_STREAMING_EVENT_FINISH == event) {
- MWR_LOGD("streaming_cb FINISH");
+ MWR_LOGI("streaming_cb FINISH");
}
if (NULL != g_utterance_streaming_cb) {
g_utterance_streaming_cb(event, buffer, len, g_utterance_streaming_user_data);
}
static int count = 0;
if (event != MAS_SPEECH_STREAMING_EVENT_CONTINUE || count % 100 == 0) {
- MAS_LOGD("[SUCCESS] __audio_streaming_cb is called, event(%d), buffer(%p), len(%d)",
+ MAS_LOGI("[SUCCESS] __audio_streaming_cb is called, event(%d), buffer(%p), len(%d)",
event, buffer, len);
}
++count;