diff options
author | asanoaozora <fifitaneki@hotmail.com> | 2016-09-13 10:59:41 +0200 |
---|---|---|
committer | asanoaozora <fifitaneki@hotmail.com> | 2016-09-13 10:59:41 +0200 |
commit | b0b9dcd407b493079ba97db14505cf49a688ec3d (patch) | |
tree | ef0a291e390a6e96b460565866f54f50592ecb21 /src/speech | |
parent | 5f95f1e69c313e492ab91b1bd643f637657d50fd (diff) | |
download | poi-service-b0b9dcd407b493079ba97db14505cf49a688ec3d.tar.gz |
add error management into Franca files, change code and scripts, test OK
Diffstat (limited to 'src/speech')
-rw-r--r-- | src/speech/main.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/speech/main.cpp b/src/speech/main.cpp index 3cf0856..bddada8 100644 --- a/src/speech/main.cpp +++ b/src/speech/main.cpp @@ -63,6 +63,7 @@ static const uint32_t MAX_CHUNK_LENGTH = 1024; /**< max length of a single promp static const uint32_t MAX_MARKER_LENGTH = 32; /**< marker tag inside the prompt chunk */ static const uint32_t PROCESS_CHUNKS_LOOP = 100; static cst_voice* mp_voice; +static cst_audio_streaming_info* mp_asi; static pthread_mutex_t mutex; static std::string m_chunkBuffer; /** max size = MAX_CHUNK_SIZE*MAX_SLOT_COUNT */ @@ -92,6 +93,12 @@ static std::string m_chunkBuffer; /** max size = MAX_CHUNK_SIZE*MAX_SLOT_COUNT * return(true); } + static int fliteCallback(const cst_wave *w, int start, int size, + int last, cst_audio_streaming_info_struct *asi) + { + printf("\n>>> [server] fliteCallback()\n"); + } + class SpeechOutputServerStub : public SpeechOutputStubDefault { @@ -110,7 +117,11 @@ public: flite_init(); mp_voice = register_cmu_us_kal(NULL); +/* mp_asi = new_audio_streaming_info(); + mp_asi->asc = fliteCallback; + feat_set(mp_voice->features,"streaming_info",audio_streaming_info_val(mp_asi)); +*/ } ~SpeechOutputServerStub() { |