| 12345678910111213141516171819202122232425262728293031323334 |
- #pragma once
- #define _ATL_APARTMENT_THREADED
- #include <stdio.h>
- #include <atlbase.h>
- #include <atlcom.h>
- #include <sapi.h>
- class CSpeech
- {
- public:
- CSpeech();
- ~CSpeech();
- // speakContent为LPCTSTR型的字符串,调用此函数即可将文字转为语音
- static void MSSSpeak(LPCTSTR speakContent);
- static void SpeakIntXiaoyuWan(int new_num, bool is_after_wan = false);
- /*
- *读一个整数
- **/
- static void SpeakInt(int num);
- /*
- *把数字拆解成一个个的读音,调用wav文件播放
- *voice_type 1:收款成功 2:退款成功
- *num 金额,比如18.23
- **/
- static void SpeakNum(int voice_type, std::string num);
- };
|