picopam.h revision b190149a69b110e6719ce0a41877a683f8db7ae7
1b190149a69b110e6719ce0a41877a683f8db7ae7Charles Chen/* 2b190149a69b110e6719ce0a41877a683f8db7ae7Charles Chen * Copyright (C) 2008-2009 SVOX AG, Baslerstr. 30, 8048 Zuerich, Switzerland 3b190149a69b110e6719ce0a41877a683f8db7ae7Charles Chen * 4b190149a69b110e6719ce0a41877a683f8db7ae7Charles Chen * Licensed under the Apache License, Version 2.0 (the "License"); 5b190149a69b110e6719ce0a41877a683f8db7ae7Charles Chen * you may not use this file except in compliance with the License. 6b190149a69b110e6719ce0a41877a683f8db7ae7Charles Chen * You may obtain a copy of the License at 7b190149a69b110e6719ce0a41877a683f8db7ae7Charles Chen * 8b190149a69b110e6719ce0a41877a683f8db7ae7Charles Chen * http://www.apache.org/licenses/LICENSE-2.0 9b190149a69b110e6719ce0a41877a683f8db7ae7Charles Chen * 10b190149a69b110e6719ce0a41877a683f8db7ae7Charles Chen * Unless required by applicable law or agreed to in writing, software 11b190149a69b110e6719ce0a41877a683f8db7ae7Charles Chen * distributed under the License is distributed on an "AS IS" BASIS, 12b190149a69b110e6719ce0a41877a683f8db7ae7Charles Chen * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13b190149a69b110e6719ce0a41877a683f8db7ae7Charles Chen * See the License for the specific language governing permissions and 14b190149a69b110e6719ce0a41877a683f8db7ae7Charles Chen * limitations under the License. 15b190149a69b110e6719ce0a41877a683f8db7ae7Charles Chen */ 16b190149a69b110e6719ce0a41877a683f8db7ae7Charles Chen/** 17b190149a69b110e6719ce0a41877a683f8db7ae7Charles Chen * @file picopam.h 18b190149a69b110e6719ce0a41877a683f8db7ae7Charles Chen * 19b190149a69b110e6719ce0a41877a683f8db7ae7Charles Chen * Phonetic to Acoustic Mapping PU - Header file 20b190149a69b110e6719ce0a41877a683f8db7ae7Charles Chen * 21b190149a69b110e6719ce0a41877a683f8db7ae7Charles Chen * Copyright (C) 2008-2009 SVOX AG, Baslerstr. 30, 8048 Zuerich, Switzerland 22b190149a69b110e6719ce0a41877a683f8db7ae7Charles Chen * All rights reserved. 23b190149a69b110e6719ce0a41877a683f8db7ae7Charles Chen * 24b190149a69b110e6719ce0a41877a683f8db7ae7Charles Chen * History: 25b190149a69b110e6719ce0a41877a683f8db7ae7Charles Chen * - 2009-04-20 -- initial version 26b190149a69b110e6719ce0a41877a683f8db7ae7Charles Chen * 27b190149a69b110e6719ce0a41877a683f8db7ae7Charles Chen */ 28b190149a69b110e6719ce0a41877a683f8db7ae7Charles Chen/** 29b190149a69b110e6719ce0a41877a683f8db7ae7Charles Chen * @addtogroup picopam 30b190149a69b110e6719ce0a41877a683f8db7ae7Charles Chen 31b190149a69b110e6719ce0a41877a683f8db7ae7Charles Chen * <b> Phonetic to acoustic mapping module </b>\n 32b190149a69b110e6719ce0a41877a683f8db7ae7Charles Chen * 33b190149a69b110e6719ce0a41877a683f8db7ae7Charles Chen * This module is responsible for mapping the phonetic domain features generated from text analysis 34b190149a69b110e6719ce0a41877a683f8db7ae7Charles Chen * into parametric representations suitable for signal generation. As such it is the interface 35b190149a69b110e6719ce0a41877a683f8db7ae7Charles Chen * between text analysis and signal generation 36b190149a69b110e6719ce0a41877a683f8db7ae7Charles Chen * 37b190149a69b110e6719ce0a41877a683f8db7ae7Charles Chen * Most the processing of PAM is logically splittable as follows 38b190149a69b110e6719ce0a41877a683f8db7ae7Charles Chen * - building a suitable symbolic feature vector set for the sentence 39b190149a69b110e6719ce0a41877a683f8db7ae7Charles Chen * - Feeding Decision Trees with the symbolic seqence vector set 40b190149a69b110e6719ce0a41877a683f8db7ae7Charles Chen * - Colecting the parametric output of the Decision trees into suitable items to be sent to following PU's 41b190149a69b110e6719ce0a41877a683f8db7ae7Charles Chen * 42b190149a69b110e6719ce0a41877a683f8db7ae7Charles Chen * To perform the decision tree feeding and output collection the PU uses an internal buffer. This 43b190149a69b110e6719ce0a41877a683f8db7ae7Charles Chen * buffer is used several times with different meanings. 44b190149a69b110e6719ce0a41877a683f8db7ae7Charles Chen * - While building the symbolic feature vector set for the sentence this data structure stores syllable relevant data. 45b190149a69b110e6719ce0a41877a683f8db7ae7Charles Chen * The corresponding phonetic data is stored outside as a single string of phonetic id's for all the sentence. 46b190149a69b110e6719ce0a41877a683f8db7ae7Charles Chen * - While feeding the decision trees the data structure is used to represent data for phonemes of the syllable 47b190149a69b110e6719ce0a41877a683f8db7ae7Charles Chen * - Addiotional data strucures are mantained to temporarily store items not pertaining to the PAM processing, for later resynchronization 48b190149a69b110e6719ce0a41877a683f8db7ae7Charles Chen * 49b190149a69b110e6719ce0a41877a683f8db7ae7Charles Chen * A quite detailed description of PAM processing is in the Know How section of the repository. 50b190149a69b110e6719ce0a41877a683f8db7ae7Charles Chen */ 51b190149a69b110e6719ce0a41877a683f8db7ae7Charles Chen 52b190149a69b110e6719ce0a41877a683f8db7ae7Charles Chen#ifndef PICOPAM_H_ 53b190149a69b110e6719ce0a41877a683f8db7ae7Charles Chen#define PICOPAM_H_ 54b190149a69b110e6719ce0a41877a683f8db7ae7Charles Chen 55b190149a69b110e6719ce0a41877a683f8db7ae7Charles Chen#include "picodata.h" 56b190149a69b110e6719ce0a41877a683f8db7ae7Charles Chen#include "picokdt.h" 57b190149a69b110e6719ce0a41877a683f8db7ae7Charles Chen#include "picokpdf.h" 58b190149a69b110e6719ce0a41877a683f8db7ae7Charles Chen#include "picoktab.h" 59b190149a69b110e6719ce0a41877a683f8db7ae7Charles Chen#include "picokdbg.h" 60b190149a69b110e6719ce0a41877a683f8db7ae7Charles Chen 61b190149a69b110e6719ce0a41877a683f8db7ae7Charles Chen#ifdef __cplusplus 62b190149a69b110e6719ce0a41877a683f8db7ae7Charles Chenextern "C" { 63b190149a69b110e6719ce0a41877a683f8db7ae7Charles Chen#endif 64b190149a69b110e6719ce0a41877a683f8db7ae7Charles Chen#if 0 65b190149a69b110e6719ce0a41877a683f8db7ae7Charles Chen} 66b190149a69b110e6719ce0a41877a683f8db7ae7Charles Chen#endif 67b190149a69b110e6719ce0a41877a683f8db7ae7Charles Chen 68b190149a69b110e6719ce0a41877a683f8db7ae7Charles Chen/*------------------------------------------------------------------ 69b190149a69b110e6719ce0a41877a683f8db7ae7Charles ChenService routines 70b190149a69b110e6719ce0a41877a683f8db7ae7Charles Chen------------------------------------------------------------------*/ 71b190149a69b110e6719ce0a41877a683f8db7ae7Charles Chenpicodata_ProcessingUnit picopam_newPamUnit( 72b190149a69b110e6719ce0a41877a683f8db7ae7Charles Chen picoos_MemoryManager mm, picoos_Common common, 73b190149a69b110e6719ce0a41877a683f8db7ae7Charles Chen picodata_CharBuffer cbIn, picodata_CharBuffer cbOut, 74b190149a69b110e6719ce0a41877a683f8db7ae7Charles Chen picorsrc_Voice voice); 75b190149a69b110e6719ce0a41877a683f8db7ae7Charles Chen 76b190149a69b110e6719ce0a41877a683f8db7ae7Charles Chen#ifdef __cplusplus 77b190149a69b110e6719ce0a41877a683f8db7ae7Charles Chen} 78b190149a69b110e6719ce0a41877a683f8db7ae7Charles Chen#endif 79b190149a69b110e6719ce0a41877a683f8db7ae7Charles Chen#endif /*PICOPAM_H_*/ 80