API function setSpeakParameter

Hi,

Where can I find more information regarding this API function? I am using following code:

mRobotAPI.setSpeakParameter(VoiceEventListener.SpeakType.NORMAL, "isForced", "true"); //speed range: 50~200
mRobotAPI.setSpeakParameter(VoiceEventListener.SpeakType.NORMAL, "speed", speed); //speed range: 50~200

  1. It seems to only work for English but not for Chinese.
  2. I have to call this function before each call to startTTS to make it work and not just once.
  3. When this function is called once for a English text, and then subsequently later when I pass any Chinese text in startTTS function, it does not work.
  4. I have tried setting "isForced" to false, just to try. I do not understand its purpose.

I am okay to make it work for English only if Chinese speed control is not supported but this impacts the Chinese text calls as well so I am unable to use it.

Can you please help?

This is the log when it works for English Text:

2024-03-20 13:19:54.089 4644-5008 xxx_NuwaAPIAgent com.silveractivities.kebbi D startTTS_1:Please make a selection from the options being shown on the screen now.
2024-03-20 13:19:54.089 4644-4695 xxx_BaseAgent com.silveractivities.kebbi D send2Svr: [audioG2, audio_setup_speak_parameter, NORMAL, speed, 90]
2024-03-20 13:19:54.090 4644-4695 xxx_BaseAgent com.silveractivities.kebbi D send2Svr: [audioG2, audio_setup_speak_parameter, NORMAL, isForced, true]
2024-03-20 13:19:54.090 4644-4695 xxx_NuwaAPIAgent com.silveractivities.kebbi D startTTS_2:Please make a selection from the options being shown on the screen now.
2024-03-20 13:19:54.090 4644-4695 xxx_BaseAgent com.silveractivities.kebbi D send2Svr: [tts, tts_speak_start, Please make a selection from the options being shown on the screen now.]
2024-03-20 13:19:54.100 4644-4662 xxx_BaseAgent com.silveractivities.kebbi D proxy Svr cmd:[tts, tts_rs_speak_status, tts_rs_type_normal, tts_rs_state_start], data=null
2024-03-20 13:19:54.101 4644-4662 xxx_BaseAgent com.silveractivities.kebbi D send2User:[tts, tts_rs_speak_status, tts_rs_type_normal, tts_rs_state_start], data=null
2024-03-20 13:19:54.101 4644-4696 xxx_NuwaAPIAgent com.silveractivities.kebbi D internalHandleEvent:[tts, tts_rs_speak_status, tts_rs_type_normal, tts_rs_state_start]
2024-03-20 13:19:54.159 4644-4662 xxx_BaseAgent com.silveractivities.kebbi D proxy Svr cmd:[tts, tts_rs_speak_status, tts_rs_type_normal, tts_rs_state_speaking], data=null
2024-03-20 13:19:54.159 4644-4662 xxx_BaseAgent com.silveractivities.kebbi D send2User:[tts, tts_rs_speak_status, tts_rs_type_normal, tts_rs_state_speaking], data=null
2024-03-20 13:19:54.159 4644-4696 xxx_NuwaAPIAgent com.silveractivities.kebbi D internalHandleEvent:[tts, tts_rs_speak_status, tts_rs_type_normal, tts_rs_state_speaking]
2024-03-20 13:19:54.164 4644-4662 xxx_BaseAgent com.silveractivities.kebbi D proxy Svr cmd:[tts, tts_rs_speak_status, tts_rs_type_normal, tts_rs_state_start], data=null
2024-03-20 13:19:54.164 4644-4662 xxx_BaseAgent com.silveractivities.kebbi D send2User:[tts, tts_rs_speak_status, tts_rs_type_normal, tts_rs_state_start], data=null
2024-03-20 13:19:54.164 4644-4696 xxx_NuwaAPIAgent com.silveractivities.kebbi D internalHandleEvent:[tts, tts_rs_speak_status, tts_rs_type_normal, tts_rs_state_start]
2024-03-20 13:19:58.183 4644-4656 xxx_BaseAgent com.silveractivities.kebbi D proxy Svr cmd:[tts, tts_complete, tts_complete_ok], data=null
2024-03-20 13:19:58.183 4644-4656 xxx_BaseAgent com.silveractivities.kebbi D send2User:[tts, tts_complete, tts_complete_ok], data=null
2024-03-20 13:19:58.184 4644-4696 xxx_NuwaAPIAgent com.silveractivities.kebbi D internalHandleEvent:[tts, tts_complete, tts_complete_ok]
2024-03-20 13:19:58.184 4644-4696 xxx_NuwaAPIAgent com.silveractivities.kebbi D TTS: 說話完畢
2024-03-20 13:19:58.185 4644-4696 xxx_NuwaAPIAgent com.silveractivities.kebbi D +notifyTTSComplete:null
2024-03-20 13:19:58.185 4644-4696 xxx_NuwaAPIAgent com.silveractivities.kebbi D -notifyTTSComplete:null

This is the log when it does not work for Chinese text. I am not calling the speak parameter function. I can see there is an error message: "TTS: 有問題,沒有說話"

2024-03-20 13:20:13.165 4644-5050 xxx_NuwaAPIAgent com.silveractivities.kebbi D startTTS_1:请从现在屏幕上显示的选项中做出选择。
2024-03-20 13:20:13.166 4644-4695 xxx_NuwaAPIAgent com.silveractivities.kebbi D startTTS_2:请从现在屏幕上显示的选项中做出选择。
2024-03-20 13:20:13.166 4644-4695 xxx_BaseAgent com.silveractivities.kebbi D send2Svr: [tts, tts_speak_start, 请从现在屏幕上显示的选项中做出选择。]
2024-03-20 13:20:13.173 4644-4656 xxx_BaseAgent com.silveractivities.kebbi D proxy Svr cmd:[tts, tts_rs_speak_status, tts_rs_type_normal, tts_rs_state_start], data=null
2024-03-20 13:20:13.173 4644-4656 xxx_BaseAgent com.silveractivities.kebbi D send2User:[tts, tts_rs_speak_status, tts_rs_type_normal, tts_rs_state_start], data=null
2024-03-20 13:20:13.174 4644-4696 xxx_NuwaAPIAgent com.silveractivities.kebbi D internalHandleEvent:[tts, tts_rs_speak_status, tts_rs_type_normal, tts_rs_state_start]
2024-03-20 13:20:13.220 4644-4656 xxx_BaseAgent com.silveractivities.kebbi D proxy Svr cmd:[tts, tts_rs_speak_status, tts_rs_type_normal, tts_rs_state_start], data=null
2024-03-20 13:20:13.222 4644-4656 xxx_BaseAgent com.silveractivities.kebbi D send2User:[tts, tts_rs_speak_status, tts_rs_type_normal, tts_rs_state_start], data=null
2024-03-20 13:20:13.222 4644-4696 xxx_NuwaAPIAgent com.silveractivities.kebbi D internalHandleEvent:[tts, tts_rs_speak_status, tts_rs_type_normal, tts_rs_state_start]
2024-03-20 13:20:13.223 4644-4659 xxx_BaseAgent com.silveractivities.kebbi D proxy Svr cmd:[tts, tts_complete, tts_complete_fail], data=null
2024-03-20 13:20:13.223 4644-4659 xxx_BaseAgent com.silveractivities.kebbi D send2User:[tts, tts_complete, tts_complete_fail], data=null
2024-03-20 13:20:13.224 4644-4696 xxx_NuwaAPIAgent com.silveractivities.kebbi D internalHandleEvent:[tts, tts_complete, tts_complete_fail]
2024-03-20 13:20:13.224 4644-4696 xxx_NuwaAPIAgent com.silveractivities.kebbi D TTS: 有問題,沒有說話
2024-03-20 13:20:13.224 4644-4696 xxx_NuwaAPIAgent com.silveractivities.kebbi D +notifyTTSComplete:null
2024-03-20 13:20:13.224 4644-4696 xxx_NuwaAPIAgent com.silveractivities.kebbi D -notifyTTSComplete:null

Thanks for sharing!

Log in to reply

Looks like your connection to NUWA robotics developer forum was lost, please wait while we try to reconnect.