#include <text_to_speech.h>
Public Member Functions | |
bool | audioConverter (const std::string base_path, const char *src_text) |
string | getAudioFile (map< string, string > current_map) |
int | play_wav (const string &file_path) |
int | set_pcm_play (FILE *fp, wave_pcm_hdr *wav_header) |
TextToSpeech (const string &basePath, const char *src_text, const string &audioFile) | |
TextToSpeech () | |
TextToSpeech (const char *src_text) | |
~TextToSpeech () | |
Static Public Member Functions | |
static map< string, string > | createMap () |
Private Attributes | |
string | audioFile |
string | basePath |
const char * | src_text |
Static Private Attributes | |
static map< string, string > | text_audio_map = TextToSpeech::createMap() |
Definition at line 38 of file text_to_speech.h.
TextToSpeech::TextToSpeech | ( | const string & | basePath, |
const char * | src_text, | ||
const string & | audioFile | ||
) |
Definition at line 24 of file text_to_speech.cpp.
TextToSpeech::TextToSpeech | ( | ) |
Definition at line 11 of file text_to_speech.cpp.
TextToSpeech::TextToSpeech | ( | const char * | src_text | ) |
Definition at line 19 of file text_to_speech.cpp.
TextToSpeech::~TextToSpeech | ( | ) |
Definition at line 35 of file text_to_speech.cpp.
bool TextToSpeech::audioConverter | ( | const std::string | base_path, |
const char * | src_text | ||
) |
tts功能实现函数
src_text | 要转换成播放语音的文字 |
Definition at line 61 of file text_to_speech.cpp.
|
static |
Definition at line 39 of file text_to_speech.cpp.
string TextToSpeech::getAudioFile | ( | map< string, string > | current_map | ) |
该函数生成音频文件存储路径
current_map | 当前的文本与语音文件的映射 |
Definition at line 50 of file text_to_speech.cpp.
int TextToSpeech::play_wav | ( | const string & | file_path | ) |
Definition at line 322 of file text_to_speech.cpp.
int TextToSpeech::set_pcm_play | ( | FILE * | fp, |
wave_pcm_hdr * | wav_header | ||
) |
Definition at line 192 of file text_to_speech.cpp.
|
private |
Definition at line 44 of file text_to_speech.h.
|
private |
Definition at line 42 of file text_to_speech.h.
|
private |
Definition at line 43 of file text_to_speech.h.
|
staticprivate |
Definition at line 45 of file text_to_speech.h.