12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061 |
- #include "includes.h"
- OS_TID idTTSTask=0;
- U64 stkTTSTask[TTS_TASK_STK_SIZE];
- OS_SEM TTSonSem;
- TTS_DEF ttsVoice;
- void MeSpeak2()
- {
- os_sem_send(&TTSonSem);
- }
- void LocalTTSHandle(void)
- {
- char buf[15];
- if(ttsVoice.Update == 0) return;
- ModemSendAT("AT+LSHTTSSTP\r\n");
- os_dly_wait(30);
- sutPocStatus.TTS=1;
- SpeakerEnable();
- snprintf(buf, sizeof(buf), "AT+LSHTTS=%d,\"",ttsVoice.Languange);
- ModemSendAT(buf);
- if(ttsVoice.voiceStatic == NULL)
- ModemSendAT(ttsVoice.voice);
- else
- ModemSendAT(ttsVoice.voiceStatic);
- ModemSendAT("\"\r\n");
- ttsVoice.Update=0;
- os_dly_wait(30);
- }
- __task void TTSTask(void)
- {
-
-
- memset((unsigned char *)&ttsVoice, 0, sizeof(TTS_DEF));
- os_sem_init (&TTSonSem, 0);
-
-
- while(1)
- {
- os_sem_wait (&TTSonSem, 0xffff);
- //beepdi();
-
- }
-
-
- }
|