Lines Matching refs:pam
391 static pico_status_t pam_allocate(picoos_MemoryManager mm, pam_subobj_t *pam);
392 static void pam_deallocate(picoos_MemoryManager mm, pam_subobj_t *pam);
468 static pico_status_t pam_allocate(picoos_MemoryManager mm, pam_subobj_t *pam) in pam_allocate() argument
473 pam->sSyllFeats = NULL; in pam_allocate()
474 pam->sPhIds = NULL; in pam_allocate()
475 pam->sPhFeats = NULL; in pam_allocate()
476 pam->sSyllItems = NULL; in pam_allocate()
477 pam->sSyllItemOffs = NULL; in pam_allocate()
487 pam->sSyllFeats = (sFtVect*) data; in pam_allocate()
492 pam_deallocate(mm, pam); in pam_allocate()
495 pam->sPhIds = (picopal_uint8*) data; in pam_allocate()
500 pam_deallocate(mm, pam); in pam_allocate()
503 pam->sPhFeats = (picopal_uint8*) data; in pam_allocate()
508 pam_deallocate(mm, pam); in pam_allocate()
511 pam->sSyllItems = (picopal_uint8*) data; in pam_allocate()
516 pam_deallocate(mm, pam); in pam_allocate()
519 pam->sSyllItemOffs = (picoos_int16*) dataI; in pam_allocate()
533 static void pam_deallocate(picoos_MemoryManager mm, pam_subobj_t *pam) in pam_deallocate() argument
538 if (pam->sSyllFeats != NULL) in pam_deallocate()
539 picoos_deallocate(mm, (void *) &pam->sSyllFeats); in pam_deallocate()
540 if (pam->sPhIds != NULL) in pam_deallocate()
541 picoos_deallocate(mm, (void *) &pam->sPhIds); in pam_deallocate()
542 if (pam->sPhFeats != NULL) in pam_deallocate()
543 picoos_deallocate(mm, (void *) &pam->sPhFeats); in pam_deallocate()
544 if (pam->sSyllItems != NULL) in pam_deallocate()
545 picoos_deallocate(mm, (void *) &pam->sSyllItems); in pam_deallocate()
546 if (pam->sSyllItemOffs != NULL) in pam_deallocate()
547 picoos_deallocate(mm, (void *) &pam->sSyllItemOffs); in pam_deallocate()
562 pam_subobj_t *pam; in pam_initialize() local
567 pam = (pam_subobj_t *) this->subObj; in pam_initialize()
568 pam->inBufSize = PICOPAM_IN_BUFF_SIZE; in pam_initialize()
569 pam->outBufSize = PICOPAM_OUT_PAM_SIZE; in pam_initialize()
570 pam->inReadPos = 0; in pam_initialize()
571 pam->inWritePos = 0; in pam_initialize()
572 pam->outReadPos = 0; in pam_initialize()
573 pam->outWritePos = 0; in pam_initialize()
574 pam->needMoreInput = 0; in pam_initialize()
575 pam->procState = 0; in pam_initialize()
583 pam->sSyllFeats[nI].phoneV[nJ] = 0; in pam_initialize()
586 pam->sPhIds[nI] = 0; in pam_initialize()
589 pam->sPhFeats[nI] = 0; in pam_initialize()
592 pam->sSyllItems[nI] = 0; in pam_initialize()
595 pam->sSyllItemOffs[nI] = 0; in pam_initialize()
599 pam->nLastAttachedItemId = pam->nCurrAttachedItem = 0; in pam_initialize()
600 pam->nAttachedItemsSize = 0; in pam_initialize()
608 pam->pMod = 1.0f; in pam_initialize()
609 pam->dMod = 1.0f; in pam_initialize()
610 pam->dRest = 0.0f; in pam_initialize()
625 pam->sil_weights[j][j] = tmp_weights[i][j]; in pam_initialize()
635 pam->dtdur = picokdt_getDtPAM(this->voice->kbArray[PICOKNOW_KBID_DT_DUR]); in pam_initialize()
636 if (pam->dtdur == NULL) { in pam_initialize()
643 pam->dtlfz[0] = picokdt_getDtPAM( in pam_initialize()
645 pam->dtlfz[1] = picokdt_getDtPAM( in pam_initialize()
647 pam->dtlfz[2] = picokdt_getDtPAM( in pam_initialize()
649 pam->dtlfz[3] = picokdt_getDtPAM( in pam_initialize()
651 pam->dtlfz[4] = picokdt_getDtPAM( in pam_initialize()
654 if (pam->dtlfz[nI] == NULL) { in pam_initialize()
662 pam->dtmgc[0] = picokdt_getDtPAM( in pam_initialize()
664 pam->dtmgc[1] = picokdt_getDtPAM( in pam_initialize()
666 pam->dtmgc[2] = picokdt_getDtPAM( in pam_initialize()
668 pam->dtmgc[3] = picokdt_getDtPAM( in pam_initialize()
670 pam->dtmgc[4] = picokdt_getDtPAM( in pam_initialize()
673 if (pam->dtmgc[nI] == NULL) { in pam_initialize()
681 pam->pdfdur = picokpdf_getPdfDUR( in pam_initialize()
683 if (pam->pdfdur == NULL) { in pam_initialize()
690 pam->pdflfz = picokpdf_getPdfMUL( in pam_initialize()
692 if (pam->pdflfz == NULL) { in pam_initialize()
699 pam->tabphones = picoktab_getPhones( in pam_initialize()
701 if (pam->tabphones == NULL) { in pam_initialize()
720 pam_subobj_t *pam; in pam_terminate() local
725 pam = (pam_subobj_t *) this->subObj; in pam_terminate()
742 pam_subobj_t* pam; in pam_subobj_deallocate() local
745 pam = (pam_subobj_t *) this->subObj; in pam_subobj_deallocate()
750 if (pam->sSyllFeats != NULL) { in pam_subobj_deallocate()
751 picoos_deallocate(this->common->mm, (void *) &pam->sSyllFeats); in pam_subobj_deallocate()
753 if (pam->sPhIds != NULL) { in pam_subobj_deallocate()
754 picoos_deallocate(this->common->mm, (void *) &pam->sPhIds); in pam_subobj_deallocate()
756 if (pam->sPhFeats != NULL) { in pam_subobj_deallocate()
757 picoos_deallocate(this->common->mm, (void *) &pam->sPhFeats); in pam_subobj_deallocate()
759 if (pam->sSyllItems != NULL) { in pam_subobj_deallocate()
760 picoos_deallocate(this->common->mm, (void *) &pam->sSyllItems); in pam_subobj_deallocate()
762 if (pam->sSyllItemOffs != NULL) { in pam_subobj_deallocate()
763 picoos_deallocate(this->common->mm, (void *) &pam->sSyllItemOffs); in pam_subobj_deallocate()
788 register pam_subobj_t * pam; in picopam_newPamUnit() local
812 pam = (pam_subobj_t *) this->subObj; in picopam_newPamUnit()
813 if (PICO_OK != pam_allocate(mm, pam)) { in picopam_newPamUnit()
889 static pico_status_t check_phones_size(pam_subobj_t *pam, in check_phones_size() argument
892 if ((pam->nCurrPhoneme + neededSize) > PICOPAM_MAX_PH_PER_SENT - 1) { in check_phones_size()
907 static pico_status_t check_syllables_size(pam_subobj_t *pam, in check_syllables_size() argument
910 if ((pam->nCurrSyllable + neededSize) > PICOPAM_MAX_SYLL_PER_SENT - 1) { in check_syllables_size()
929 register pam_subobj_t * pam; in pamCheckResourceLimits() local
935 pam = (pam_subobj_t *) this->subObj; in pamCheckResourceLimits()
945 if (pam->nCurrSyllable >= PICOPAM_MAX_SYLL_PER_SENT - 2) { in pamCheckResourceLimits()
948 if ((pam->nCurrPhoneme + head.len) >= PICOPAM_MAX_PH_PER_SENT - 2) { in pamCheckResourceLimits()
962 if (pam->nCurrSyllable >= PICOPAM_MAX_SYLL_PER_SENT - 2) { in pamCheckResourceLimits()
965 if ((pam->nCurrPhoneme + 1) >= PICOPAM_MAX_PH_PER_SENT - 2) { in pamCheckResourceLimits()
973 if ((pam->nAttachedItemsSize + head.len) in pamCheckResourceLimits()
995 register pam_subobj_t * pam; in pam_check_immediate() local
999 pam = (pam_subobj_t *) this->subObj; in pam_check_immediate()
1001 if (pam->nCurrSyllable <= -1) { in pam_check_immediate()
1028 register pam_subobj_t * pam; in pam_hastobe_queued() local
1033 pam = (pam_subobj_t *) this->subObj; in pam_hastobe_queued()
1072 register pam_subobj_t * pam; in pam_queue() local
1079 pam = (pam_subobj_t *) this->subObj; in pam_queue()
1087 if ((pam->nAttachedItemsSize + head.len + sizeof(picodata_itemhead_t)) in pam_queue()
1092 pam->sSyllItemOffs[pam->nLastAttachedItemId] = pam->nAttachedItemsSize; in pam_queue()
1095 pam->sSyllItems[pam->nAttachedItemsSize + nI] = item[nI]; in pam_queue()
1098 pam->nAttachedItemsSize += nI; in pam_queue()
1101 pam->nLastAttachedItemId++; in pam_queue()
1103 if (pam->nCurrSyllable > -1) { in pam_queue()
1105 if (pam->sSyllFeats[pam->nCurrSyllable].phoneV[ITM] == 0) { in pam_queue()
1106 pam->sSyllFeats[pam->nCurrSyllable].phoneV[ITM] in pam_queue()
1107 = pam->nLastAttachedItemId; in pam_queue()
1109 pam->sSyllFeats[pam->nCurrSyllable].phoneV[itm] in pam_queue()
1110 = pam->nLastAttachedItemId; in pam_queue()
1115 if (pam->sSyllFeats[0].phoneV[ITM] == 0) { in pam_queue()
1116 pam->sSyllFeats[0].phoneV[ITM] = pam->nLastAttachedItemId; in pam_queue()
1118 pam->sSyllFeats[0].phoneV[itm] = pam->nLastAttachedItemId; in pam_queue()
1163 register pam_subobj_t * pam; in pamHasToProcess() local
1169 pam = (pam_subobj_t *) this->subObj; in pamHasToProcess()
1171 nCond1 = pam->nCurrSyllable <= -1; in pamHasToProcess()
1172 nCond2 = pam->nCurrSyllable >= pam->nTotalSyllables; in pamHasToProcess()
1173 nCond3 = pam->nSyllPhoneme in pamHasToProcess()
1174 >= pam->sSyllFeats[pam->nCurrSyllable].phoneV[B3]; in pamHasToProcess()
1192 register pam_subobj_t * pam; in pamUpdateProcess() local
1197 pam = (pam_subobj_t *) this->subObj; in pamUpdateProcess()
1199 if (pam->nCurrSyllable == -1) { in pamUpdateProcess()
1204 if (pam->nSyllPhoneme < pam->sSyllFeats[pam->nCurrSyllable].phoneV[B3] - 1) { in pamUpdateProcess()
1205 pam->nSyllPhoneme++; in pamUpdateProcess()
1208 if (pam->nSyllPhoneme == pam->sSyllFeats[pam->nCurrSyllable].phoneV[B3] - 1) { in pamUpdateProcess()
1210 pam->nSyllPhoneme++; in pamUpdateProcess()
1213 if (pam->sSyllFeats[pam->nCurrSyllable].phoneV[ITM] > 0) { in pamUpdateProcess()
1215 if (pam->nCurrAttachedItem == 0) { in pamUpdateProcess()
1217 pam->nCurrAttachedItem in pamUpdateProcess()
1218 = pam->sSyllFeats[pam->nCurrSyllable].phoneV[ITM]; in pamUpdateProcess()
1222 if (pam->nCurrAttachedItem in pamUpdateProcess()
1223 < pam->sSyllFeats[pam->nCurrSyllable].phoneV[itm]) { in pamUpdateProcess()
1225 pam->nCurrAttachedItem++; in pamUpdateProcess()
1231 if (pam->nCurrSyllable < pam->nTotalSyllables - 1) { in pamUpdateProcess()
1232 pam->nCurrSyllable++; in pamUpdateProcess()
1233 pam->nSyllPhoneme = 0; in pamUpdateProcess()
1234 pam->nCurrAttachedItem = 0; in pamUpdateProcess()
1238 pam->nCurrSyllable++; in pamUpdateProcess()
1239 pam->nSyllPhoneme = 0; in pamUpdateProcess()
1254 register pam_subobj_t * pam; in pamHasToPop() local
1259 pam = (pam_subobj_t *) this->subObj; in pamHasToPop()
1262 if (pam->nCurrSyllable <= -1) in pamHasToPop()
1266 if (pam->nCurrSyllable >= pam->nTotalSyllables) in pamHasToPop()
1270 if ((pam->sSyllFeats[pam->nCurrSyllable].phoneV[ITM] <= 0) in pamHasToPop()
1271 || (pam->sSyllFeats[pam->nCurrSyllable].phoneV[itm] <= 0)) in pamHasToPop()
1275 if (pam->nCurrAttachedItem in pamHasToPop()
1276 > pam->sSyllFeats[pam->nCurrSyllable].phoneV[itm]) in pamHasToPop()
1292 register pam_subobj_t * pam; in pamPopItem() local
1297 pam = (pam_subobj_t *) this->subObj; in pamPopItem()
1300 if (pam->nCurrSyllable <= -1) in pamPopItem()
1304 if (pam->nCurrSyllable >= pam->nTotalSyllables) in pamPopItem()
1308 if ((pam->sSyllFeats[pam->nCurrSyllable].phoneV[ITM] <= 0) in pamPopItem()
1309 || (pam->sSyllFeats[pam->nCurrSyllable].phoneV[itm] <= 0)) in pamPopItem()
1313 if (pam->nCurrAttachedItem in pamPopItem()
1314 > pam->sSyllFeats[pam->nCurrSyllable].phoneV[itm]) in pamPopItem()
1317 nItem = pam->nCurrAttachedItem; in pamPopItem()
1319 return &(pam->sSyllItems[pam->sSyllItemOffs[nItem - 1]]); in pamPopItem()
1336 register pam_subobj_t * pam; in pamPopAttachedSy0() local
1341 pam = (pam_subobj_t *) this->subObj; in pamPopAttachedSy0()
1344 if (pam->nCurrSyllable != 0) in pamPopAttachedSy0()
1348 if ((pam->sSyllFeats[pam->nCurrSyllable].phoneV[ITM] <= 0) in pamPopAttachedSy0()
1349 || (pam->sSyllFeats[pam->nCurrSyllable].phoneV[itm] <= 0)) in pamPopAttachedSy0()
1353 if (pam->nCurrAttachedItem > 0) { in pamPopAttachedSy0()
1355 if (pam->nCurrAttachedItem in pamPopAttachedSy0()
1356 > pam->sSyllFeats[pam->nCurrSyllable].phoneV[itm] - 1) in pamPopAttachedSy0()
1359 nItem = pam->nCurrAttachedItem; in pamPopAttachedSy0()
1360 return &(pam->sSyllItems[pam->sSyllItemOffs[nItem]]); in pamPopAttachedSy0()
1381 pam_subobj_t *pam; in pam_get_duration() local
1386 pam = (pam_subobj_t *) this->subObj; in pam_get_duration()
1390 pdf = pam->pdfdur; in pam_get_duration()
1417 *phonDur = (picoos_uint16) (((picoos_single) * phonDur) * pam->dMod); in pam_get_duration()
1419 fValue = pam->dRest + (picoos_single) numFramesState[nI] * pam->dMod; in pam_get_duration()
1421 pam->dRest = fValue - (picoos_single) numFramesState[nI]; in pam_get_duration()
1442 pam_subobj_t *pam; in pam_get_f0() local
1447 pam = (pam_subobj_t *) this->subObj; in pam_get_f0()
1457 lf0IndexOffset += pam->pdflfz->stateoffset[nI]; in pam_get_f0()
1458 if (lf0IndexOffset > pam->pdflfz->numframes - 1) { in pam_get_f0()
1459 …zPdf access error, index overflow -> index: %d , numframes: %d", lf0Index, pam->pdflfz->numframes)… in pam_get_f0()
1463 lf0IndexOffset *= pam->pdflfz->vecsize; in pam_get_f0()
1465 lfItem = &(pam->pdflfz->content[lf0IndexOffset]); in pam_get_f0()
1468 lfum = (picoos_single) (sTemp << (pam->pdflfz->meanpowUm[0])); in pam_get_f0()
1471 << pam->pdflfz->ivarpow[0]); in pam_get_f0()
1477 phonF0[nI] *= pam->pMod; in pam_get_f0()
1520 pam_subobj_t *pam; in pam_update_vector() local
1525 pam = (pam_subobj_t *) this->subObj; in pam_update_vector()
1530 pam->sPhFeats[DUR] = 0; in pam_update_vector()
1531 pam->sPhFeats[F0] = 0; in pam_update_vector()
1547 f0avg += pam->phonF0[nI]; in pam_update_vector()
1557 if ((pam->nCurrSyllable == 0) && (pam->nSyllPhoneme == 0)) { in pam_update_vector()
1558 pam->phonDur = 2 * 4; in pam_update_vector()
1561 fDur = (picoos_single) pam->phonDur; in pam_update_vector()
1570 pam->sPhFeats[DUR] = (picoos_uint8) (fDur / (picoos_single) 10.0f); in pam_update_vector()
1571 pam->sPhFeats[F0] = (picoos_uint8) (f0avg / (picoos_single) 10.0f); in pam_update_vector()
1607 pam_subobj_t *pam; in pam_expand_vector() local
1610 pam = (pam_subobj_t *) this->subObj; in pam_expand_vector()
1614 inVect = &(pam->sSyllFeats[pam->nCurrSyllable].phoneV[0]); in pam_expand_vector()
1615 phonVect = &(pam->sPhIds[0]); in pam_expand_vector()
1616 outVect = &(pam->sPhFeats[0]); in pam_expand_vector()
1623 nOffs = nOffs + pam->nSyllPhoneme; /*offset to current phone of current syllable*/ in pam_expand_vector()
1625 if (pam->nSyllPhoneme >= nLen) { in pam_expand_vector()
1646 if (nOffs1 < pam->nTotalPhonemes) in pam_expand_vector()
1652 if (nOffs1 < pam->nTotalPhonemes) in pam_expand_vector()
1657 outVect[P6] = pam->nSyllPhoneme + 1; in pam_expand_vector()
1659 outVect[P7] = nLen - pam->nSyllPhoneme; in pam_expand_vector()
1661 if (pam->nSyllPhoneme < inVect[P8]) in pam_expand_vector()
1679 pam_subobj_t *pam; in pamCompressVector() local
1681 pam = (pam_subobj_t *) this->subObj; in pamCompressVector()
1685 outVect = &(pam->sPhFeats[0]); in pamCompressVector()
1723 pam_subobj_t *pam; in pamReorgVector() local
1725 pam = (pam_subobj_t *) this->subObj; in pamReorgVector()
1729 outVect = &(pam->sPhFeats[0]); in pamReorgVector()
1899 pam_subobj_t *pam; in pam_put_item() local
1904 pam = (pam_subobj_t *) this->subObj; in pam_put_item()
1910 sDest[1] = pam->sPhFeats[P3]; /*phonetic id*/ in pam_put_item()
1915 if ((pam->nCurrSyllable == 0) && (pam->nSyllPhoneme == 0)) { in pam_put_item()
1917 pam->numFramesState[nI] = 0; in pam_put_item()
1918 pam->numFramesState[nI] = 2; in pam_put_item()
1922 picoos_read_mem_pi_uint16(pam->sSyllFeats[pam->nCurrSyllable].phoneV, in pam_put_item()
1925 picoos_read_mem_pi_uint16(pam->sSyllFeats[pam->nCurrSyllable].phoneV, in pam_put_item()
1930 nType = pam->sSyllFeats[pam->nCurrSyllable].phoneV[bnd]; in pam_put_item()
1955 &(pam->numFramesState[0]), /* estimated durations */ in pam_put_item()
1956 pam->sil_weights[nIdx], /* integer weights */ in pam_put_item()
1967 (picoos_uint16) pam->numFramesState[nI]); in pam_put_item()
1969 (picoos_uint16) pam->lf0Index[nI]); in pam_put_item()
1971 (picoos_uint16) pam->mgcIndex[nI]); in pam_put_item()
2067 pam_subobj_t *pam; in pamDoCommand() local
2071 pam = (pam_subobj_t *) this->subObj; in pamDoCommand()
2080 pam->nLastAttachedItemId = pam->nCurrAttachedItem = 0; in pamDoCommand()
2081 pam->nAttachedItemsSize = 0; in pamDoCommand()
2093 pam->pMod = fValue; in pamDoCommand()
2095 pam->dMod = (1.0f / fValue); in pamDoCommand()
2101 pam->pMod *= (1.0f / fValue); in pamDoCommand()
2103 pam->dMod *= (1.0f / fValue); in pamDoCommand()
2189 pam_subobj_t *pam; in pamPhoneProcess() local
2194 pam = (pam_subobj_t *) this->subObj; in pamPhoneProcess()
2204 if (!pam_do_tree(this, pam->dtdur, &(pam->sPhFeats[0]), PICOPAM_INVEC_SIZE, in pamPhoneProcess()
2209 pam->durIndex = dTreeResult.class; in pamPhoneProcess()
2210 sResult = pam_get_duration(this, pam->durIndex, &(pam->phonDur), in pamPhoneProcess()
2211 &(pam->numFramesState[0])); in pamPhoneProcess()
2215 if (!pam_do_tree(this, pam->dtlfz[nI], &(pam->sPhFeats[0]), in pamPhoneProcess()
2220 pam->lf0Index[nI] = dTreeResult.class; in pamPhoneProcess()
2225 sResult = pam_get_f0(this, &(pam->lf0Index[0]), nI, &(pam->phonF0[0])); in pamPhoneProcess()
2233 if (!pam_do_tree(this, pam->dtmgc[nI], &(pam->sPhFeats[0]), in pamPhoneProcess()
2238 pam->mgcIndex[nI] = dTreeResult.class; in pamPhoneProcess()
2241 sResult = pam_put_item(this, pam->outBuf, pam->outWritePos, &bWr); in pamPhoneProcess()
2243 pam->outWritePos += bWr; in pamPhoneProcess()
2261 pam_subobj_t *pam; in pamDoPreSyll() local
2266 pam = (pam_subobj_t *) this->subObj; in pamDoPreSyll()
2275 …pam_put_qItem(qItem, pam->outBuf, pam->outWritePos, &bWr);/*popped item has to be sent to next PU*/ in pamDoPreSyll()
2276 pam->outWritePos += bWr; in pamDoPreSyll()
2287 pam->nCurrAttachedItem++; in pamDoPreSyll()
2296 sResult = pam_put_qItem(qItem, pam->outBuf, pam->outWritePos, &bWr); in pamDoPreSyll()
2297 pam->outWritePos += bWr; in pamDoPreSyll()
2298 pam->nCurrAttachedItem++; in pamDoPreSyll()
2319 register pam_subobj_t * pam; in pam_step() local
2335 pam = (pam_subobj_t *) this->subObj; in pam_step()
2342 PICODBG_DEBUG(("pam_step -- doing state %i",pam->procState)); in pam_step()
2344 switch (pam->procState) { in pam_step()
2350 &(pam->inBuf[pam->inWritePos]), pam->inBufSize in pam_step()
2351 - pam->inWritePos, &blen); in pam_step()
2365 &(pam->inBuf[pam->inWritePos]), blen); in pam_step()
2368 pam->inWritePos += blen; in pam_step()
2369 pam->inReadPos += blen; in pam_step()
2370 if (pam->inReadPos >= pam->inWritePos) { in pam_step()
2371 pam->inReadPos = 0; in pam_step()
2372 pam->inWritePos = 0; in pam_step()
2373 … }PICODBG_DEBUG(("pam_step -- item is not valid, type: %d",pam->inBuf[pam->inWritePos])); in pam_step()
2378 pam->inWritePos += blen; in pam_step()
2379 pam->procState = PICOPAM_SCHEDULE; in pam_step()
2384 if (pam->inReadPos >= pam->inWritePos) { in pam_step()
2386 pam->procState = PICOPAM_COLLECT; in pam_step()
2393 if (is_pam_play_command(&(pam->inBuf[pam->inReadPos])) == TRUE) { in pam_step()
2395 pam->inReadPos += pam->inBuf[pam->inReadPos + 3] in pam_step()
2397 if (pam->inReadPos >= pam->inWritePos) { in pam_step()
2398 pam->inReadPos = 0; in pam_step()
2399 pam->inWritePos = 0; in pam_step()
2405 if (pam_check_immediate(this, &(pam->inBuf[pam->inReadPos]))) { in pam_step()
2407 pam->procState = PICOPAM_IMMEDIATE; in pam_step()
2410 if (pamCheckResourceLimits(this, &(pam->inBuf[pam->inReadPos]))) { in pam_step()
2413 pam->procState = PICOPAM_FORWARD_FORCE_TERM; in pam_step()
2417 if (pam_deal_with(&(pam->inBuf[pam->inReadPos]))) { in pam_step()
2419 pam->procState = PICOPAM_FORWARD; in pam_step()
2423 if (pam_hastobe_queued(this, &(pam->inBuf[pam->inReadPos]))) { in pam_step()
2425 pam_queue(this, &(pam->inBuf[pam->inReadPos])); in pam_step()
2427 pam->inReadPos += pam->inBuf[pam->inReadPos + 3] in pam_step()
2429 if (pam->inReadPos >= pam->inWritePos) { in pam_step()
2430 pam->inReadPos = 0; in pam_step()
2431 pam->inWritePos = 0; in pam_step()
2438 pam->procState = PICOPAM_IMMEDIATE; in pam_step()
2447 &(pam->inBuf[pam->inReadPos])); in pam_step()
2450 if (pam_hastobe_queued(this, &(pam->inBuf[pam->inReadPos]))) { in pam_step()
2452 pam_queue(this, &(pam->inBuf[pam->inReadPos])); in pam_step()
2457 pam->needMoreInput = FALSE; in pam_step()
2459 pam->inReadPos += pam->inBuf[pam->inReadPos + 3] in pam_step()
2461 if (pam->inReadPos >= pam->inWritePos) { in pam_step()
2462 pam->inReadPos = 0; in pam_step()
2463 pam->inWritePos = 0; in pam_step()
2468 pam->procState = PICOPAM_PROCESS; in pam_step()
2473 pam->nLastAttachedItemId = pam->nCurrAttachedItem in pam_step()
2475 pam->nAttachedItemsSize = 0; in pam_step()
2477 pam->procState = PICOPAM_SCHEDULE; in pam_step()
2483 pam->needMoreInput = TRUE; in pam_step()
2485 pam->inReadPos += pam->inBuf[pam->inReadPos + 3] in pam_step()
2487 if (pam->inReadPos >= pam->inWritePos) { in pam_step()
2491 pam->inReadPos = 0; in pam_step()
2492 pam->inWritePos = 0; in pam_step()
2493 pam->procState = PICOPAM_SCHEDULE; in pam_step()
2507 pam->procState = PICOPAM_IMMEDIATE; in pam_step()
2527 pam->procState = PICOPAM_PROCESS; in pam_step()
2532 pam->nLastAttachedItemId = pam->nCurrAttachedItem in pam_step()
2534 pam->nAttachedItemsSize = 0; in pam_step()
2536 pam->procState = PICOPAM_SCHEDULE; in pam_step()
2544 pam->nLastAttachedItemId = pam->nCurrAttachedItem = 0; in pam_step()
2545 pam->nAttachedItemsSize = 0; in pam_step()
2547 pam->procState = PICOPAM_SCHEDULE; in pam_step()
2556 if ((PICOPAM_FRAME_ITEM_SIZE + 4) > (pam->outBufSize in pam_step()
2557 - pam->outWritePos)) { in pam_step()
2562 if (pam->nCurrSyllable == 0) { in pam_step()
2570 pam->retState = PICOPAM_PROCESS; in pam_step()
2571 pam->procState = PICOPAM_FEED; in pam_step()
2580 pam->retState = PICOPAM_PROCESS; in pam_step()
2581 pam->procState = PICOPAM_PROCESS; in pam_step()
2592 pam->retState = PICOPAM_SCHEDULE; in pam_step()
2593 pam->procState = PICOPAM_SCHEDULE; in pam_step()
2608 pam->procState = PICOPAM_FEED; /*switch to feed*/ in pam_step()
2624 sResult = pam_put_qItem(qItem, pam->outBuf, in pam_step()
2625 pam->outWritePos, &bWr); in pam_step()
2630 pam->outWritePos += bWr; /*item write ok*/ in pam_step()
2631 pam->procState = PICOPAM_FEED; /*switch to feed*/ in pam_step()
2640 pam->retState = PICOPAM_SCHEDULE; in pam_step()
2641 pam->procState = PICOPAM_SCHEDULE; /*switch to schedule */ in pam_step()
2651 pam->procState = PICOPAM_SCHEDULE; /*switch to schedule */ in pam_step()
2661 + pam->inBuf[pam->inReadPos + 3]; in pam_step()
2662 sResult = picodata_copy_item(&(pam->inBuf[pam->inReadPos]), in pam_step()
2663 numinb, &(pam->outBuf[pam->outWritePos]), in pam_step()
2664 pam->outBufSize - pam->outWritePos, &numoutb); in pam_step()
2667 pam->inReadPos += numinb; in pam_step()
2668 if (pam->inReadPos >= pam->inWritePos) { in pam_step()
2669 pam->inReadPos = 0; in pam_step()
2670 pam->inWritePos = 0; in pam_step()
2671 pam->needMoreInput = FALSE; in pam_step()
2673 pam->outWritePos += numoutb; in pam_step()
2674 pam->procState = PICOPAM_FEED; /*switch to FEED state*/ in pam_step()
2675 pam->retState = PICOPAM_SCHEDULE; /*back to SCHEDULE after FEED*/ in pam_step()
2692 &(pam->outBuf[pam->outReadPos]), pam->outWritePos in pam_step()
2693 - pam->outReadPos, &numoutb); in pam_step()
2699 pam->outBuf + pam->outReadPos, pam->outBufSize); in pam_step()
2701 pam->outReadPos += numoutb; in pam_step()
2703 if (pam->outReadPos >= pam->outWritePos) { in pam_step()
2705 pam->outReadPos = 0; in pam_step()
2706 pam->outWritePos = 0; in pam_step()
2708 switch (pam->retState) { in pam_step()
2710 pam->procState = PICOPAM_IMMEDIATE; in pam_step()
2711 pam->retState = PICOPAM_SCHEDULE; in pam_step()
2715 pam->procState = PICOPAM_PLAY; in pam_step()
2716 pam->retState = PICOPAM_SCHEDULE; in pam_step()
2727 pam->procState = PICOPAM_PROCESS; in pam_step()
2729 pam->nCurrSyllable = -1; in pam_step()
2731 pam->nLastAttachedItemId = pam->nCurrAttachedItem in pam_step()
2733 pam->nAttachedItemsSize = 0; in pam_step()
2735 pam->nSyllPhoneme = 0; in pam_step()
2736 pam->procState = PICOPAM_SCHEDULE; in pam_step()
2750 pam->outReadPos = 0; in pam_step()
2751 pam->outWritePos = 0; in pam_step()
2752 pam->procState = PICOPAM_COLLECT; in pam_step()
2827 pam_subobj_t *pam; in pam_get_vowel_name() local
2832 pam = (pam_subobj_t *) this->subObj; in pam_get_vowel_name()
2840 nCond1 = picoktab_isSyllCarrier(pam->tabphones, phon[nI]); in pam_get_vowel_name()
2861 pam_subobj_t *pam; in pam_get_pause_id() local
2865 pam = (pam_subobj_t *) this->subObj; in pam_get_pause_id()
2866 nVal1 = picoktab_getPauseID(pam->tabphones); in pam_get_pause_id()
2960 pam_subobj_t *pam; in pam_reset_processors() local
2964 pam = (pam_subobj_t *) this->subObj; in pam_reset_processors()
2966 pam->nCurrSyllable = -1; in pam_reset_processors()
2967 pam->nTotalPhonemes = pam->nSyllPhoneme = pam->nCurrPhoneme in pam_reset_processors()
2968 = pam->nTotalSyllables = pam->sType = pam->pType = 0; in pam_reset_processors()
2969 pam->dRest = 0.0f; in pam_reset_processors()
2971 pam->a3_overall_syllable = pam->a3_primary_phrase_syllable = pam->b4_b5_syllable = in pam_reset_processors()
2972 pam->b6_b7_syllable = pam->b6_b7_state = pam->b8_b9_stressed_syllable = in pam_reset_processors()
2973 pam->b10_b11_accented_syllable = pam->b12_b13_syllable = pam->b12_b13_state = in pam_reset_processors()
2974 pam->b14_b15_syllable = pam->b14_b15_state = pam->b17_b19_syllable = in pam_reset_processors()
2975 pam->b17_b19_state = pam->b18_b20_b21_syllable = pam->b18_b20_b21_state = in pam_reset_processors()
2976 pam->c3_overall_syllable= pam->c3_primary_phrase_syllable = pam->d2_syllable_in_word = in pam_reset_processors()
2977 …pam->d2_prev_syllable_in_word = pam->d2_current_primary_phrase_word = pam->e1_syllable_word_start = in pam_reset_processors()
2978 pam->e1_syllable_word_end= pam->e1_content = pam->e2_syllable_word_start = in pam_reset_processors()
2979 pam->e2_syllable_word_end= pam->e3_e4_word = pam->e3_e4_state = in pam_reset_processors()
2980 pam->e5_e6_content_word = pam->e5_e6_content = pam->e7_e8_word = in pam_reset_processors()
2981 pam->e7_e8_content = pam->e7_e8_state = pam->e9_e11_word = in pam_reset_processors()
2982 pam->e9_e11_saw_word = pam->e9_e11_state = pam->e10_e12_e13_word = in pam_reset_processors()
2983 pam->e10_e12_e13_state = pam->e10_e12_e13_saw_word = pam->f2_overall_word = in pam_reset_processors()
2984 …pam->f2_word_syllable = pam->f2_next_word_syllable = pam->f2_current_primary_phrase_word = in pam_reset_processors()
2985 pam->g1_current_secondary_phrase_syllable = pam->g1_current_syllable = in pam_reset_processors()
2986 pam->g2_current_secondary_phrase_word = pam->g2_current_word = in pam_reset_processors()
2987 …pam->h1_current_secondary_phrase_syll = pam->h2_current_secondary_phrase_wor… in pam_reset_processors()
2988 pam->h3_h4_current_secondary_phrase_word = pam->h5_current_phrase_type = in pam_reset_processors()
2989 … pam->h5_syllable = pam->h5_state = pam->i1_secondary_phrase_syllable = in pam_reset_processors()
2990 … pam->i1_next_secondary_phrase_syllable = pam->i2_secondary_phrase_word = in pam_reset_processors()
2991 pam->i2_next_secondary_phrase_word = pam->j1_utterance_syllable = in pam_reset_processors()
2992 pam->j2_utterance_word = pam->j3_utterance_sec_phrases = 0; in pam_reset_processors()
2994 pam->b4_b5_syllable = pam->b17_b19_syllable = pam->b18_b20_b21_syllable = in pam_reset_processors()
2995 pam->e9_e11_word = pam->e10_e12_e13_word = pam->e7_e8_word = in pam_reset_processors()
2996 pam->h2_current_secondary_phrase_word = 1; in pam_reset_processors()
2998 pam->e1_syllable_word_start = pam->e1_syllable_word_end = pam->e2_syllable_word_start = in pam_reset_processors()
2999 pam->e2_syllable_word_end = -1; in pam_reset_processors()
3015 pam_subobj_t *pam; in pam_reset_processors_back() local
3019 pam = (pam_subobj_t *) this->subObj; in pam_reset_processors_back()
3022 pam->a3_overall_syllable in pam_reset_processors_back()
3023 = pam->a3_primary_phrase_syllable in pam_reset_processors_back()
3024 = pam->b4_b5_syllable in pam_reset_processors_back()
3025 = pam->b6_b7_syllable in pam_reset_processors_back()
3026 = pam->b6_b7_state in pam_reset_processors_back()
3027 = pam->b8_b9_stressed_syllable in pam_reset_processors_back()
3028 = pam->b10_b11_accented_syllable in pam_reset_processors_back()
3029 = pam->b12_b13_syllable in pam_reset_processors_back()
3030 = pam->b12_b13_state in pam_reset_processors_back()
3031 = pam->b14_b15_syllable in pam_reset_processors_back()
3032 = pam->b14_b15_state in pam_reset_processors_back()
3033 = pam->b17_b19_syllable in pam_reset_processors_back()
3034 = pam->b17_b19_state in pam_reset_processors_back()
3035 = pam->b18_b20_b21_syllable in pam_reset_processors_back()
3036 = pam->b18_b20_b21_state in pam_reset_processors_back()
3037 = pam->c3_overall_syllable in pam_reset_processors_back()
3038 = pam->c3_primary_phrase_syllable in pam_reset_processors_back()
3039 = pam->d2_syllable_in_word in pam_reset_processors_back()
3040 = pam->d2_prev_syllable_in_word in pam_reset_processors_back()
3041 = pam->d2_current_primary_phrase_word in pam_reset_processors_back()
3042 = pam->e1_syllable_word_start in pam_reset_processors_back()
3043 = pam->e1_syllable_word_end in pam_reset_processors_back()
3044 = pam->e1_content in pam_reset_processors_back()
3045 = pam->e2_syllable_word_start in pam_reset_processors_back()
3046 = pam->e2_syllable_word_end in pam_reset_processors_back()
3047 = pam->e3_e4_word in pam_reset_processors_back()
3048 = pam->e3_e4_state in pam_reset_processors_back()
3049 = pam->e5_e6_content_word in pam_reset_processors_back()
3050 = pam->e5_e6_content in pam_reset_processors_back()
3051 = pam->e7_e8_word in pam_reset_processors_back()
3052 = pam->e7_e8_content in pam_reset_processors_back()
3053 = pam->e7_e8_state in pam_reset_processors_back()
3054 = pam->e9_e11_word in pam_reset_processors_back()
3055 = pam->e9_e11_saw_word in pam_reset_processors_back()
3056 = pam->e9_e11_state in pam_reset_processors_back()
3057 = pam->e10_e12_e13_word in pam_reset_processors_back()
3058 = pam->e10_e12_e13_state in pam_reset_processors_back()
3059 = pam->e10_e12_e13_saw_word in pam_reset_processors_back()
3060 = pam->f2_overall_word in pam_reset_processors_back()
3061 = pam->f2_word_syllable in pam_reset_processors_back()
3062 = pam->f2_next_word_syllable in pam_reset_processors_back()
3063 = pam->f2_current_primary_phrase_word in pam_reset_processors_back()
3064 = pam->g1_current_secondary_phrase_syllable in pam_reset_processors_back()
3065 = pam->g1_current_syllable in pam_reset_processors_back()
3066 = pam->g2_current_secondary_phrase_word in pam_reset_processors_back()
3067 = pam->g2_current_word in pam_reset_processors_back()
3068 = pam->h1_current_secondary_phrase_syll in pam_reset_processors_back()
3069 = pam->h2_current_secondary_phrase_word in pam_reset_processors_back()
3070 = pam->h3_h4_current_secondary_phrase_word in pam_reset_processors_back()
3071 = pam->h5_current_phrase_type in pam_reset_processors_back()
3072 = pam->h5_state in pam_reset_processors_back()
3073 = pam->i1_secondary_phrase_syllable in pam_reset_processors_back()
3074 = pam->i1_next_secondary_phrase_syllable in pam_reset_processors_back()
3075 = pam->i2_secondary_phrase_word in pam_reset_processors_back()
3076 = pam->i2_next_secondary_phrase_word in pam_reset_processors_back()
3079 pam->b4_b5_syllable = pam->b17_b19_syllable = pam->b18_b20_b21_syllable in pam_reset_processors_back()
3080 = pam->e9_e11_word = pam->e10_e12_e13_word = pam->e7_e8_word in pam_reset_processors_back()
3081 = pam->h2_current_secondary_phrase_word = 1; in pam_reset_processors_back()
3083 pam->e1_syllable_word_start = pam->e1_syllable_word_end in pam_reset_processors_back()
3084 = pam->e2_syllable_word_start = pam->e2_syllable_word_end = -1; in pam_reset_processors_back()
3106 pam_subobj_t *pam; in pam_process_event_feature() local
3110 pam = (pam_subobj_t *) this->subObj; in pam_process_event_feature()
3111 syllCurr = pam->nCurrSyllable; in pam_process_event_feature()
3118 if ((pam->sSyllFeats[pam->nCurrSyllable].phoneV[P1] in pam_process_event_feature()
3119 == 1) || (pam->a3_primary_phrase_syllable >= 1)) { in pam_process_event_feature()
3120 if (pam->a3_overall_syllable < 1) in pam_process_event_feature()
3121 pam->sSyllFeats[pam->nCurrSyllable].phoneV[A3] in pam_process_event_feature()
3124 pam->sSyllFeats[pam->nCurrSyllable].phoneV[A3] in pam_process_event_feature()
3125 = pam->sSyllFeats[pam->nCurrSyllable in pam_process_event_feature()
3128 pam->sSyllFeats[pam->nCurrSyllable].phoneV[A3] = 0; in pam_process_event_feature()
3130 pam->a3_primary_phrase_syllable++; in pam_process_event_feature()
3131 pam->a3_overall_syllable++; in pam_process_event_feature()
3134 pam->a3_primary_phrase_syllable = 0; in pam_process_event_feature()
3160 if (pam->sSyllFeats[pam->nCurrSyllable].phoneV[P1] == 0) { in pam_process_event_feature()
3161 pam->sSyllFeats[pam->nCurrSyllable].phoneV[sDest] in pam_process_event_feature()
3162 = pam->b4_b5_syllable; in pam_process_event_feature()
3163 pam->b4_b5_syllable++; in pam_process_event_feature()
3165 pam->sSyllFeats[pam->nCurrSyllable].phoneV[sDest] = 0; in pam_process_event_feature()
3171 pam->b4_b5_syllable = 1; in pam_process_event_feature()
3188 switch (pam->b6_b7_state) { in pam_process_event_feature()
3191 pam->sSyllFeats[pam->nCurrSyllable].phoneV[sDest] in pam_process_event_feature()
3194 pam->b6_b7_syllable = 1; in pam_process_event_feature()
3195 pam->b6_b7_state = 1; in pam_process_event_feature()
3200 pam->sSyllFeats[pam->nCurrSyllable].phoneV[sDest] in pam_process_event_feature()
3201 = pam->b6_b7_syllable; in pam_process_event_feature()
3202 pam->b6_b7_syllable++; in pam_process_event_feature()
3205 pam->b6_b7_syllable = 1; in pam_process_event_feature()
3208 pam->b6_b7_state = 0; in pam_process_event_feature()
3230 pam->sSyllFeats[pam->nCurrSyllable].phoneV[sDest] in pam_process_event_feature()
3231 = pam->b8_b9_stressed_syllable; in pam_process_event_feature()
3232 if (pam->sSyllFeats[pam->nCurrSyllable].phoneV[B1] == 1) in pam_process_event_feature()
3233 pam->b8_b9_stressed_syllable++; in pam_process_event_feature()
3236 pam->b8_b9_stressed_syllable = 0; in pam_process_event_feature()
3255 pam->sSyllFeats[pam->nCurrSyllable].phoneV[sDest] in pam_process_event_feature()
3256 = pam->b10_b11_accented_syllable; in pam_process_event_feature()
3257 if (pam->sSyllFeats[pam->nCurrSyllable].phoneV[B2] == 1) in pam_process_event_feature()
3258 pam->b10_b11_accented_syllable++; in pam_process_event_feature()
3261 pam->b10_b11_accented_syllable = 0; in pam_process_event_feature()
3278 switch (pam->b12_b13_state) { in pam_process_event_feature()
3281 if (pam->sSyllFeats[pam->nCurrSyllable].phoneV[B1] == 0) in pam_process_event_feature()
3282 pam->sSyllFeats[pam->nCurrSyllable].phoneV[sDest] in pam_process_event_feature()
3285 pam->b12_b13_syllable = 0; in pam_process_event_feature()
3286 pam->sSyllFeats[pam->nCurrSyllable].phoneV[sDest] in pam_process_event_feature()
3288 pam->b12_b13_state = 1; in pam_process_event_feature()
3294 pam->sSyllFeats[pam->nCurrSyllable].phoneV[sDest] in pam_process_event_feature()
3295 = pam->b12_b13_syllable; in pam_process_event_feature()
3296 if (pam->sSyllFeats[pam->nCurrSyllable].phoneV[B1] == 1) in pam_process_event_feature()
3297 pam->b12_b13_syllable = 0; in pam_process_event_feature()
3299 pam->b12_b13_syllable++; in pam_process_event_feature()
3300 pam->b12_b13_state = 2; in pam_process_event_feature()
3303 pam->b12_b13_state = 0; in pam_process_event_feature()
3307 pam->sSyllFeats[pam->nCurrSyllable].phoneV[sDest] in pam_process_event_feature()
3308 = pam->b12_b13_syllable; in pam_process_event_feature()
3309 if (pam->sSyllFeats[pam->nCurrSyllable].phoneV[B1] == 1) in pam_process_event_feature()
3310 pam->b12_b13_syllable = 0; in pam_process_event_feature()
3312 pam->b12_b13_syllable++; in pam_process_event_feature()
3315 pam->b12_b13_state = 0; in pam_process_event_feature()
3337 switch (pam->b14_b15_state) { in pam_process_event_feature()
3340 if (pam->sSyllFeats[pam->nCurrSyllable].phoneV[B2] == 0) in pam_process_event_feature()
3341 pam->sSyllFeats[pam->nCurrSyllable].phoneV[sDest] in pam_process_event_feature()
3344 pam->b14_b15_syllable = 0; in pam_process_event_feature()
3345 pam->sSyllFeats[pam->nCurrSyllable].phoneV[sDest] in pam_process_event_feature()
3347 pam->b14_b15_state = 1; in pam_process_event_feature()
3353 pam->sSyllFeats[pam->nCurrSyllable].phoneV[sDest] in pam_process_event_feature()
3354 = pam->b14_b15_syllable; in pam_process_event_feature()
3355 if (pam->sSyllFeats[pam->nCurrSyllable].phoneV[B2] == 1) in pam_process_event_feature()
3356 pam->b14_b15_syllable = 0; in pam_process_event_feature()
3358 pam->b14_b15_syllable++; in pam_process_event_feature()
3359 pam->b14_b15_state = 2; in pam_process_event_feature()
3362 pam->b14_b15_state = 0; in pam_process_event_feature()
3367 pam->sSyllFeats[pam->nCurrSyllable].phoneV[sDest] in pam_process_event_feature()
3368 = pam->b14_b15_syllable; in pam_process_event_feature()
3369 if (pam->sSyllFeats[pam->nCurrSyllable].phoneV[B2] == 1) in pam_process_event_feature()
3370 pam->b14_b15_syllable = 0; in pam_process_event_feature()
3372 pam->b14_b15_syllable++; in pam_process_event_feature()
3375 pam->b14_b15_state = 0; in pam_process_event_feature()
3389 switch (pam->b17_b19_state) { in pam_process_event_feature()
3392 pam->sSyllFeats[pam->nCurrSyllable].phoneV[B17] in pam_process_event_feature()
3394 pam->sSyllFeats[pam->nCurrSyllable].phoneV[B19] in pam_process_event_feature()
3395 = pam->b17_b19_syllable; in pam_process_event_feature()
3396 pam->b17_b19_syllable++; in pam_process_event_feature()
3400 && (pam->b17_b19_syllable > 1)) { in pam_process_event_feature()
3402 pam->b17_b19_syllable = 1; in pam_process_event_feature()
3403 pam->b17_b19_state = 1; in pam_process_event_feature()
3408 pam->sSyllFeats[pam->nCurrSyllable].phoneV[B17] in pam_process_event_feature()
3409 = pam->b17_b19_syllable; in pam_process_event_feature()
3410 pam->sSyllFeats[pam->nCurrSyllable].phoneV[B19] in pam_process_event_feature()
3412 pam->b17_b19_syllable++; in pam_process_event_feature()
3415 pam->b17_b19_syllable = 1; in pam_process_event_feature()
3432 switch (pam->b18_b20_b21_state) { in pam_process_event_feature()
3435 pam->sSyllFeats[pam->nCurrSyllable].phoneV[B18] in pam_process_event_feature()
3437 if (pam->sSyllFeats[pam->nCurrSyllable].phoneV[P6] in pam_process_event_feature()
3439 pam->sSyllFeats[pam->nCurrSyllable].phoneV[B20] in pam_process_event_feature()
3440 = pam->b18_b20_b21_syllable; in pam_process_event_feature()
3441 pam->sSyllFeats[pam->nCurrSyllable].phoneV[B21] in pam_process_event_feature()
3444 pam->sSyllFeats[pam->nCurrSyllable].phoneV[B20] in pam_process_event_feature()
3446 pam->sSyllFeats[pam->nCurrSyllable].phoneV[B21] in pam_process_event_feature()
3447 = pam->b18_b20_b21_syllable; in pam_process_event_feature()
3449 pam->b18_b20_b21_syllable++; in pam_process_event_feature()
3453 && (pam->b18_b20_b21_syllable > 1)) { in pam_process_event_feature()
3455 pam->b18_b20_b21_syllable = 1; in pam_process_event_feature()
3456 pam->b18_b20_b21_state = 1; in pam_process_event_feature()
3461 pam->sSyllFeats[pam->nCurrSyllable].phoneV[B18] in pam_process_event_feature()
3462 = pam->b18_b20_b21_syllable; in pam_process_event_feature()
3463 pam->sSyllFeats[pam->nCurrSyllable].phoneV[B20] in pam_process_event_feature()
3465 pam->sSyllFeats[pam->nCurrSyllable].phoneV[B21] in pam_process_event_feature()
3467 pam->b18_b20_b21_syllable++; in pam_process_event_feature()
3470 pam->b18_b20_b21_syllable = 1; in pam_process_event_feature()
3492 if ((pam->sSyllFeats[pam->nCurrSyllable].phoneV[P1] in pam_process_event_feature()
3493 == 1) || (pam->c3_primary_phrase_syllable >= 1)) { in pam_process_event_feature()
3494 if (pam->c3_overall_syllable < 1) in pam_process_event_feature()
3495 pam->sSyllFeats[pam->nCurrSyllable].phoneV[C3] in pam_process_event_feature()
3498 pam->sSyllFeats[pam->nCurrSyllable].phoneV[C3] in pam_process_event_feature()
3499 = pam->sSyllFeats[pam->nCurrSyllable in pam_process_event_feature()
3502 pam->sSyllFeats[pam->nCurrSyllable].phoneV[C3] = 0; in pam_process_event_feature()
3504 pam->c3_primary_phrase_syllable++; in pam_process_event_feature()
3505 pam->c3_overall_syllable++; in pam_process_event_feature()
3508 pam->c3_primary_phrase_syllable = 0; in pam_process_event_feature()
3517 if ((pam->sSyllFeats[pam->nCurrSyllable].phoneV[P1] in pam_process_event_feature()
3518 == 1) || (pam->d2_current_primary_phrase_word in pam_process_event_feature()
3520 pam->sSyllFeats[pam->nCurrSyllable].phoneV[D2] in pam_process_event_feature()
3521 = pam->d2_prev_syllable_in_word; in pam_process_event_feature()
3523 pam->sSyllFeats[pam->nCurrSyllable].phoneV[D2] = 0; in pam_process_event_feature()
3525 pam->d2_syllable_in_word++; in pam_process_event_feature()
3530 pam->d2_current_primary_phrase_word = 1; in pam_process_event_feature()
3531 pam->d2_prev_syllable_in_word in pam_process_event_feature()
3532 = pam->d2_syllable_in_word; in pam_process_event_feature()
3533 pam->d2_syllable_in_word = 0; in pam_process_event_feature()
3537 pam->d2_current_primary_phrase_word = 0; in pam_process_event_feature()
3549 if (pam->e1_syllable_word_start == -1) in pam_process_event_feature()
3550 pam->e1_syllable_word_start in pam_process_event_feature()
3551 = (picoos_int8) pam->nCurrSyllable; in pam_process_event_feature()
3552 if (pam->sSyllFeats[pam->nCurrSyllable].phoneV[P5] == 1) in pam_process_event_feature()
3553 pam->e1_content = 1; in pam_process_event_feature()
3554 pam->e1_syllable_word_end in pam_process_event_feature()
3555 = (picoos_int8) pam->nCurrSyllable; in pam_process_event_feature()
3560 if ((pam->e1_syllable_word_start != -1) in pam_process_event_feature()
3561 && (pam->e1_syllable_word_end != -1)) { in pam_process_event_feature()
3562 for (nI = pam->e1_syllable_word_start; nI in pam_process_event_feature()
3563 <= pam->e1_syllable_word_end; nI++) in pam_process_event_feature()
3564 pam->sSyllFeats[nI].phoneV[E1] in pam_process_event_feature()
3565 = pam->e1_content; in pam_process_event_feature()
3567 pam->e1_content = 0; in pam_process_event_feature()
3568 pam->e1_syllable_word_start = -1; in pam_process_event_feature()
3569 pam->e1_syllable_word_end = -1; in pam_process_event_feature()
3581 if (pam->e2_syllable_word_start == -1) in pam_process_event_feature()
3582 pam->e2_syllable_word_start in pam_process_event_feature()
3583 = (picoos_int8) pam->nCurrSyllable; in pam_process_event_feature()
3584 pam->e2_syllable_word_end in pam_process_event_feature()
3585 = (picoos_int8) pam->nCurrSyllable; in pam_process_event_feature()
3590 if ((pam->e2_syllable_word_start != -1) in pam_process_event_feature()
3591 && (pam->e2_syllable_word_end != -1)) { in pam_process_event_feature()
3592 for (nI = pam->e2_syllable_word_start; nI in pam_process_event_feature()
3593 <= pam->e2_syllable_word_end; nI++) in pam_process_event_feature()
3594 pam->sSyllFeats[nI].phoneV[E2] in pam_process_event_feature()
3595 = pam->e2_syllable_word_end in pam_process_event_feature()
3596 - pam->e2_syllable_word_start in pam_process_event_feature()
3599 pam->e1_content = 0; in pam_process_event_feature()
3600 pam->e2_syllable_word_start = -1; in pam_process_event_feature()
3601 pam->e2_syllable_word_end = -1; in pam_process_event_feature()
3620 switch (pam->e3_e4_state) { in pam_process_event_feature()
3623 pam->sSyllFeats[pam->nCurrSyllable].phoneV[sDest] in pam_process_event_feature()
3626 pam->e3_e4_word = 1; in pam_process_event_feature()
3627 pam->e3_e4_state = 1; in pam_process_event_feature()
3632 pam->sSyllFeats[pam->nCurrSyllable].phoneV[sDest] in pam_process_event_feature()
3633 = pam->e3_e4_word; in pam_process_event_feature()
3635 pam->e3_e4_word = 1; in pam_process_event_feature()
3637 pam->e3_e4_word++; in pam_process_event_feature()
3639 pam->e3_e4_state = 0; in pam_process_event_feature()
3660 pam->sSyllFeats[pam->nCurrSyllable].phoneV[sDest] in pam_process_event_feature()
3661 = pam->e5_e6_content_word; in pam_process_event_feature()
3662 if (pam->sSyllFeats[pam->nCurrSyllable].phoneV[P5] == 1) in pam_process_event_feature()
3663 pam->e5_e6_content = 1; in pam_process_event_feature()
3668 if (pam->e5_e6_content == 1) in pam_process_event_feature()
3669 pam->e5_e6_content_word++; in pam_process_event_feature()
3670 pam->e5_e6_content = 0; in pam_process_event_feature()
3672 pam->e5_e6_content_word = 0; in pam_process_event_feature()
3689 switch (pam->e7_e8_state) { in pam_process_event_feature()
3692 pam->sSyllFeats[pam->nCurrSyllable].phoneV[sDest] in pam_process_event_feature()
3694 if (pam->sSyllFeats[pam->nCurrSyllable].phoneV[P5] == 1) in pam_process_event_feature()
3695 pam->e7_e8_content = 1; in pam_process_event_feature()
3698 pam->e7_e8_content = 0; in pam_process_event_feature()
3703 if (pam->e7_e8_content == 1) { in pam_process_event_feature()
3704 pam->e7_e8_word = 0; in pam_process_event_feature()
3705 pam->e7_e8_content = 0; in pam_process_event_feature()
3706 pam->e7_e8_state = 1; in pam_process_event_feature()
3712 pam->sSyllFeats[pam->nCurrSyllable].phoneV[sDest] in pam_process_event_feature()
3713 = pam->e7_e8_word; in pam_process_event_feature()
3714 if (pam->sSyllFeats[pam->nCurrSyllable].phoneV[P5] == 1) in pam_process_event_feature()
3715 pam->e7_e8_content = 1; in pam_process_event_feature()
3719 if (pam->e7_e8_content == 1) { in pam_process_event_feature()
3720 pam->e7_e8_word = 0; in pam_process_event_feature()
3721 pam->e7_e8_content = 0; in pam_process_event_feature()
3723 pam->e7_e8_word++; in pam_process_event_feature()
3727 pam->e7_e8_state = 0; in pam_process_event_feature()
3728 pam->e7_e8_content = 0; /*<<<<<< added */ in pam_process_event_feature()
3741 switch (pam->e9_e11_state) { in pam_process_event_feature()
3744 pam->sSyllFeats[pam->nCurrSyllable].phoneV[E9] in pam_process_event_feature()
3746 pam->sSyllFeats[pam->nCurrSyllable].phoneV[E11] in pam_process_event_feature()
3747 = pam->e9_e11_word; in pam_process_event_feature()
3748 … pam->e9_e11_saw_word = 1; /*new variable, needs to be initialized to 0*/ in pam_process_event_feature()
3751 pam->e9_e11_word++; in pam_process_event_feature()
3754 && (pam->e9_e11_saw_word == 1)) { /* modified*/ in pam_process_event_feature()
3756 pam->e9_e11_word = 1; in pam_process_event_feature()
3758 pam->e9_e11_word++; /*modified*/ in pam_process_event_feature()
3759 pam->e9_e11_state = 1; in pam_process_event_feature()
3764 pam->sSyllFeats[pam->nCurrSyllable].phoneV[E9] in pam_process_event_feature()
3765 = pam->e9_e11_word; in pam_process_event_feature()
3766 pam->sSyllFeats[pam->nCurrSyllable].phoneV[E11] in pam_process_event_feature()
3771 pam->e9_e11_word++; in pam_process_event_feature()
3773 pam->e9_e11_word = 1; in pam_process_event_feature()
3789 switch (pam->e10_e12_e13_state) { in pam_process_event_feature()
3792 pam->sSyllFeats[pam->nCurrSyllable].phoneV[E10] in pam_process_event_feature()
3794 pam->e10_e12_e13_saw_word = 1; in pam_process_event_feature()
3795 if (pam->sSyllFeats[pam->nCurrSyllable].phoneV[P6] in pam_process_event_feature()
3797 pam->sSyllFeats[pam->nCurrSyllable].phoneV[E12] in pam_process_event_feature()
3798 = pam->e10_e12_e13_word; in pam_process_event_feature()
3799 pam->sSyllFeats[pam->nCurrSyllable].phoneV[E13] in pam_process_event_feature()
3802 pam->sSyllFeats[pam->nCurrSyllable].phoneV[E12] in pam_process_event_feature()
3804 pam->sSyllFeats[pam->nCurrSyllable].phoneV[E13] in pam_process_event_feature()
3805 = pam->e10_e12_e13_word; in pam_process_event_feature()
3809 pam->e10_e12_e13_word++; in pam_process_event_feature()
3814 && (pam->e10_e12_e13_saw_word > 0)) { in pam_process_event_feature()
3816 pam->e10_e12_e13_word = 1; in pam_process_event_feature()
3818 pam->e10_e12_e13_word++; in pam_process_event_feature()
3819 pam->e10_e12_e13_state = 1; in pam_process_event_feature()
3824 pam->sSyllFeats[pam->nCurrSyllable].phoneV[E10] in pam_process_event_feature()
3825 = pam->e10_e12_e13_word; in pam_process_event_feature()
3826 pam->sSyllFeats[pam->nCurrSyllable].phoneV[E12] in pam_process_event_feature()
3828 pam->sSyllFeats[pam->nCurrSyllable].phoneV[E13] in pam_process_event_feature()
3833 pam->e10_e12_e13_word++; in pam_process_event_feature()
3835 pam->e10_e12_e13_word = 1; in pam_process_event_feature()
3857 … if (pam->f2_current_primary_phrase_word >= 1)/*at least second word in current primary phrase*/ in pam_process_event_feature()
3858 pam->sSyllFeats[pam->nCurrSyllable].phoneV[F2] in pam_process_event_feature()
3859 = pam->f2_next_word_syllable; in pam_process_event_feature()
3862 pam->sSyllFeats[pam->nCurrSyllable].phoneV[F2] = 0; in pam_process_event_feature()
3863 pam->f2_word_syllable++; in pam_process_event_feature()
3868 pam->f2_next_word_syllable = pam->f2_word_syllable; in pam_process_event_feature()
3869 pam->f2_word_syllable = 0; in pam_process_event_feature()
3872 pam->f2_current_primary_phrase_word = 0; in pam_process_event_feature()
3876 pam->f2_current_primary_phrase_word++; in pam_process_event_feature()
3884 if (pam->g1_current_secondary_phrase_syllable > 0) in pam_process_event_feature()
3885 pam->sSyllFeats[pam->nCurrSyllable].phoneV[G1] in pam_process_event_feature()
3886 = pam->g1_current_secondary_phrase_syllable; in pam_process_event_feature()
3888 pam->sSyllFeats[pam->nCurrSyllable].phoneV[G1] = 0; in pam_process_event_feature()
3889 pam->g1_current_syllable++; in pam_process_event_feature()
3892 pam->g1_current_secondary_phrase_syllable in pam_process_event_feature()
3893 = pam->g1_current_syllable; in pam_process_event_feature()
3894 pam->g1_current_syllable = 0; in pam_process_event_feature()
3897 pam->g1_current_secondary_phrase_syllable = 0; in pam_process_event_feature()
3898 pam->g1_current_syllable = 0; in pam_process_event_feature()
3908 if (pam->g2_current_secondary_phrase_word > 0) in pam_process_event_feature()
3909 pam->sSyllFeats[pam->nCurrSyllable].phoneV[G2] in pam_process_event_feature()
3910 = pam->g2_current_secondary_phrase_word; in pam_process_event_feature()
3912 pam->sSyllFeats[pam->nCurrSyllable].phoneV[G2] = 0; in pam_process_event_feature()
3915 pam->g2_current_word++; in pam_process_event_feature()
3918 pam->g2_current_secondary_phrase_word in pam_process_event_feature()
3919 = pam->g2_current_word + 1; in pam_process_event_feature()
3920 pam->g2_current_word = 0; in pam_process_event_feature()
3923 pam->g2_current_secondary_phrase_word = 0; in pam_process_event_feature()
3924 pam->g2_current_word = 0; in pam_process_event_feature()
3935 pam->h1_current_secondary_phrase_syll++; in pam_process_event_feature()
3936 pam->sSyllFeats[pam->nCurrSyllable].phoneV[H1] in pam_process_event_feature()
3937 = pam->h1_current_secondary_phrase_syll; in pam_process_event_feature()
3941 pam->h1_current_secondary_phrase_syll = 0; in pam_process_event_feature()
3945 pam->sSyllFeats[pam->nCurrSyllable].phoneV[H1] in pam_process_event_feature()
3946 = pam->h1_current_secondary_phrase_syll; in pam_process_event_feature()
3948 pam->h1_current_secondary_phrase_syll in pam_process_event_feature()
3949 = pam->sSyllFeats[pam->nCurrSyllable].phoneV[H1]; in pam_process_event_feature()
3951 pam->h1_current_secondary_phrase_syll in pam_process_event_feature()
3952 = pam->sSyllFeats[pam->nCurrSyllable - 1].phoneV[H1]; in pam_process_event_feature()
3960 pam->sSyllFeats[pam->nCurrSyllable].phoneV[H2] in pam_process_event_feature()
3961 = pam->h2_current_secondary_phrase_word; in pam_process_event_feature()
3964 pam->h2_current_secondary_phrase_word++; in pam_process_event_feature()
3965 pam->sSyllFeats[pam->nCurrSyllable].phoneV[H2] in pam_process_event_feature()
3966 = pam->h2_current_secondary_phrase_word; in pam_process_event_feature()
3969 pam->sSyllFeats[pam->nCurrSyllable].phoneV[H2] in pam_process_event_feature()
3970 = pam->h2_current_secondary_phrase_word + 1; in pam_process_event_feature()
3971 pam->h2_current_secondary_phrase_word = 0; in pam_process_event_feature()
3974 if (pam->nCurrSyllable > 1) in pam_process_event_feature()
3975 pam->sSyllFeats[pam->nCurrSyllable - 1].phoneV[H2] in pam_process_event_feature()
3976 = pam->h2_current_secondary_phrase_word + 1; in pam_process_event_feature()
3977 pam->h2_current_secondary_phrase_word = 0; in pam_process_event_feature()
3982 pam->sSyllFeats[pam->nCurrSyllable].phoneV[H2] in pam_process_event_feature()
3983 = pam->h2_current_secondary_phrase_word; in pam_process_event_feature()
3985 pam->h2_current_secondary_phrase_word in pam_process_event_feature()
3986 = pam->sSyllFeats[pam->nCurrSyllable].phoneV[H2]; in pam_process_event_feature()
3988 pam->h2_current_secondary_phrase_word in pam_process_event_feature()
3989 = pam->sSyllFeats[pam->nCurrSyllable - 1].phoneV[H2]; in pam_process_event_feature()
4006 pam->sSyllFeats[pam->nCurrSyllable].phoneV[sDest] in pam_process_event_feature()
4007 = pam->h3_h4_current_secondary_phrase_word; in pam_process_event_feature()
4011 pam->h3_h4_current_secondary_phrase_word++; in pam_process_event_feature()
4021 switch (pam->h5_state) { in pam_process_event_feature()
4024 pam->sSyllFeats[pam->nCurrSyllable].phoneV[H5] in pam_process_event_feature()
4025 = pam->sSyllFeats[pam->nCurrSyllable].phoneV[H5]; in pam_process_event_feature()
4027 pam->h5_state = 1; in pam_process_event_feature()
4032 if ((pam->sSyllFeats[pam->nCurrSyllable].phoneV[H5] in pam_process_event_feature()
4034 && (pam->sSyllFeats[pam->nCurrSyllable].phoneV[P1] in pam_process_event_feature()
4036 pam->sSyllFeats[pam->nCurrSyllable].phoneV[H5] in pam_process_event_feature()
4040 pam->h5_state = 0; in pam_process_event_feature()
4057 pam->i1_secondary_phrase_syllable++; in pam_process_event_feature()
4058 pam->sSyllFeats[pam->nCurrSyllable].phoneV[I1] in pam_process_event_feature()
4059 = pam->i1_secondary_phrase_syllable; in pam_process_event_feature()
4063 pam->i1_secondary_phrase_syllable = 0; in pam_process_event_feature()
4067 pam->sSyllFeats[pam->nCurrSyllable].phoneV[I1] in pam_process_event_feature()
4068 = pam->i1_next_secondary_phrase_syllable; in pam_process_event_feature()
4071 pam->i1_next_secondary_phrase_syllable in pam_process_event_feature()
4072 = pam->i1_secondary_phrase_syllable; in pam_process_event_feature()
4073 pam->i1_secondary_phrase_syllable in pam_process_event_feature()
4074 = pam->sSyllFeats[pam->nCurrSyllable].phoneV[I1]; in pam_process_event_feature()
4077 pam->i1_next_secondary_phrase_syllable = 0; in pam_process_event_feature()
4078 pam->i1_secondary_phrase_syllable in pam_process_event_feature()
4079 = pam->sSyllFeats[pam->nCurrSyllable - 1].phoneV[I1]; in pam_process_event_feature()
4088 pam->sSyllFeats[pam->nCurrSyllable].phoneV[I2] in pam_process_event_feature()
4089 = pam->i2_secondary_phrase_word; in pam_process_event_feature()
4092 pam->i2_secondary_phrase_word++; in pam_process_event_feature()
4096 pam->i2_secondary_phrase_word = 1; in pam_process_event_feature()
4101 pam->sSyllFeats[pam->nCurrSyllable].phoneV[I2] in pam_process_event_feature()
4102 = pam->i2_next_secondary_phrase_word; in pam_process_event_feature()
4105 pam->i2_next_secondary_phrase_word in pam_process_event_feature()
4106 = pam->i2_secondary_phrase_word; in pam_process_event_feature()
4107 pam->i2_secondary_phrase_word in pam_process_event_feature()
4108 = pam->sSyllFeats[pam->nCurrSyllable].phoneV[I2]; in pam_process_event_feature()
4111 pam->i2_next_secondary_phrase_word = 0; in pam_process_event_feature()
4112 pam->i2_secondary_phrase_word in pam_process_event_feature()
4113 = pam->sSyllFeats[pam->nCurrSyllable - 1].phoneV[I2]; in pam_process_event_feature()
4122 if (pam->sSyllFeats[pam->nCurrSyllable].phoneV[P1] != 1) in pam_process_event_feature()
4123 pam->j1_utterance_syllable++; in pam_process_event_feature()
4127 pam->sSyllFeats[pam->nCurrSyllable].phoneV[J1] in pam_process_event_feature()
4128 = pam->j1_utterance_syllable; in pam_process_event_feature()
4138 pam->j2_utterance_word++; in pam_process_event_feature()
4141 pam->sSyllFeats[pam->nCurrSyllable].phoneV[J2] in pam_process_event_feature()
4142 = pam->j2_utterance_word - 1; in pam_process_event_feature()
4150 pam->j3_utterance_sec_phrases++; in pam_process_event_feature()
4154 pam->j3_utterance_sec_phrases++; in pam_process_event_feature()
4159 pam->sSyllFeats[pam->nCurrSyllable].phoneV[J3] in pam_process_event_feature()
4160 = pam->j3_utterance_sec_phrases - 1; in pam_process_event_feature()
4184 pam_subobj_t *pam; in pam_process_event() local
4188 pam = (pam_subobj_t *) this->subObj; in pam_process_event()
4193 pam->sSyllFeats[pam->nCurrSyllable].phoneV[P2] = 1; in pam_process_event()
4196 pam->sSyllFeats[pam->nCurrSyllable].phoneV[P3] = 1; in pam_process_event()
4199 pam->sSyllFeats[pam->nCurrSyllable].phoneV[P4] = 1; in pam_process_event()
4228 pam_subobj_t *pam; in pam_create_syllable() local
4237 pam = (pam_subobj_t *) this->subObj; in pam_create_syllable()
4240 if (check_syllables_size(pam, 1) != PICO_OK) { in pam_create_syllable()
4246 if (check_phones_size(pam, 1) != PICO_OK) { in pam_create_syllable()
4256 if (check_phones_size(pam, sContent[3]) != PICO_OK) { in pam_create_syllable()
4262 pam->nCurrSyllable = pam->nCurrSyllable + 1; in pam_create_syllable()
4265 if (pam->nCurrSyllable > 0) { in pam_create_syllable()
4266 pam->sSyllFeats[pam->nCurrSyllable].phoneV[nI] = 0; in pam_create_syllable()
4269 if (pam->sSyllFeats[pam->nCurrSyllable].phoneV[nI] > 0) { in pam_create_syllable()
4274 pam->sSyllFeats[pam->nCurrSyllable].phoneV[nI] = 0; in pam_create_syllable()
4278 pam->sSyllFeats[pam->nCurrSyllable].phoneV[nI] = 0; in pam_create_syllable()
4289 picoos_write_mem_pi_uint16(pam->sSyllFeats[pam->nCurrSyllable].phoneV, in pam_create_syllable()
4294 picoos_write_mem_pi_uint16(pam->sSyllFeats[pam->nCurrSyllable].phoneV, in pam_create_syllable()
4302 pam->sSyllFeats[pam->nCurrSyllable].phoneV[P6] in pam_create_syllable()
4305 pam->sSyllFeats[pam->nCurrSyllable].phoneV[P6] in pam_create_syllable()
4308 pam->sSyllFeats[pam->nCurrSyllable].phoneV[bnd] = uBoundType; in pam_create_syllable()
4309 …pam->sSyllFeats[pam->nCurrSyllable].phoneV[P1] = 1; /*this means the syllable contains a pause-sil… in pam_create_syllable()
4310 pam->sSyllFeats[pam->nCurrSyllable].phoneV[P8] = 1; in pam_create_syllable()
4314 pam->sSyllFeats[pam->nCurrSyllable].phoneV[B3] in pam_create_syllable()
4315 = pam->sSyllFeats[pam->nCurrSyllable].phoneV[B4] in pam_create_syllable()
4316 = pam->sSyllFeats[pam->nCurrSyllable].phoneV[B5] in pam_create_syllable()
4317 = pam->sSyllFeats[pam->nCurrSyllable].phoneV[B6] in pam_create_syllable()
4318 = pam->sSyllFeats[pam->nCurrSyllable].phoneV[B7] in pam_create_syllable()
4321 pam->sSyllFeats[pam->nCurrSyllable].phoneV[B16] in pam_create_syllable()
4324 pam->sSyllFeats[pam->nCurrSyllable].phoneV[E2] in pam_create_syllable()
4325 = pam->sSyllFeats[pam->nCurrSyllable].phoneV[E3] in pam_create_syllable()
4326 = pam->sSyllFeats[pam->nCurrSyllable].phoneV[E4] = 1; in pam_create_syllable()
4328 pam->sSyllFeats[pam->nCurrSyllable].phoneV[H5] = phType; in pam_create_syllable()
4331 pam->sPhIds[pam->nCurrPhoneme] = pam_get_pause_id(this); in pam_create_syllable()
4332 picoos_mem_copy((void*) &pam->nCurrPhoneme, in pam_create_syllable()
4333 &(pam->sSyllFeats[pam->nCurrSyllable].phoneV[FID]), in pam_create_syllable()
4334 sizeof(pam->nCurrPhoneme)); in pam_create_syllable()
4335 pam->nCurrPhoneme++; in pam_create_syllable()
4336 pam->nTotalPhonemes++; in pam_create_syllable()
4338 pam->nTotalSyllables++; in pam_create_syllable()
4345 pam->sSyllFeats[pam->nCurrSyllable].phoneV[P5] = 1; /*set content syllable indicator*/ in pam_create_syllable()
4347 pam->sSyllFeats[pam->nCurrSyllable].phoneV[P6] in pam_create_syllable()
4350 pam->sSyllFeats[pam->nCurrSyllable].phoneV[P6] in pam_create_syllable()
4355 pam->sSyllFeats[pam->nCurrSyllable].phoneV[B1] = 1; in pam_create_syllable()
4359 pam->sSyllFeats[pam->nCurrSyllable].phoneV[B2] = 1; in pam_create_syllable()
4361 pam->sSyllFeats[pam->nCurrSyllable].phoneV[B3] = sContent[3];/*len*/ in pam_create_syllable()
4363 if (pam->nCurrSyllable > 30) in pam_create_syllable()
4364 pam->nCurrSyllable = pam->nCurrSyllable; in pam_create_syllable()
4366 pam->sSyllFeats[pam->nCurrSyllable].phoneV[B16] = pam_get_vowel_name(this, in pam_create_syllable()
4369 …pam->sSyllFeats[pam->nCurrSyllable].phoneV[P8] = pos; /*temp for storing the position of the vowel… in pam_create_syllable()
4371 pam->sSyllFeats[pam->nCurrSyllable].phoneV[H5] = phType; in pam_create_syllable()
4374 picoos_mem_copy((void*) &pam->nCurrPhoneme, in pam_create_syllable()
4375 &(pam->sSyllFeats[pam->nCurrSyllable].phoneV[FID]), in pam_create_syllable()
4376 sizeof(pam->nCurrPhoneme)); in pam_create_syllable()
4378 pam->sPhIds[pam->nCurrPhoneme + nI] = sContent[4 + nI]; in pam_create_syllable()
4379 pam->nCurrPhoneme += nI; in pam_create_syllable()
4380 pam->nTotalPhonemes += nI; in pam_create_syllable()
4382 pam->nTotalSyllables++; in pam_create_syllable()
4402 register pam_subobj_t * pam; in pam_adapter_forward_step() local
4410 pam = (pam_subobj_t *) this->subObj; in pam_adapter_forward_step()
4437 pam->sType in pam_adapter_forward_step()
4439 pam->pType = pam_map_phrase_type(itemBase[1], itemBase[2]); in pam_adapter_forward_step()
4442 pam->sType, pam->pType, itemBase[1], uMinDur, in pam_adapter_forward_step()
4458 pam->sType in pam_adapter_forward_step()
4460 pam->pType = pam_map_phrase_type(itemBase[1], itemBase[2]); in pam_adapter_forward_step()
4463 pam->sType, pam->pType, itemBase[1], uMinDur, in pam_adapter_forward_step()
4483 pam->sType in pam_adapter_forward_step()
4485 pam->pType = pam_map_phrase_type(itemBase[1], itemBase[2]); in pam_adapter_forward_step()
4506 pam->sType, pam->pType, itemBase[1], uMinDur, in pam_adapter_forward_step()
4519 if (pam->nCurrSyllable == -1) { in pam_adapter_forward_step()
4525 pam->sType, pam->pType, itemBase[1], uMinDur, in pam_adapter_forward_step()
4550 if (pam->nCurrSyllable == -1) { in pam_adapter_forward_step()
4554 pam->sType, pam->pType, PICODATA_ITEMINFO1_BOUND_SBEG, in pam_adapter_forward_step()
4565 pam->sType, pam->pType, 0, 0, 0); in pam_adapter_forward_step()
4594 register pam_subobj_t * pam; in pam_adapter_backward_step() local
4601 pam = (pam_subobj_t *) this->subObj; in pam_adapter_backward_step()
4606 nSyll = pam->nCurrSyllable; in pam_adapter_backward_step()
4607 while (pam->nCurrSyllable >= 0) { in pam_adapter_backward_step()
4609 if (pam->sSyllFeats[pam->nCurrSyllable].phoneV[P2] == 1) { in pam_adapter_backward_step()
4612 pam->nCurrSyllable--; in pam_adapter_backward_step()
4616 && (pam->sSyllFeats[pam->nCurrSyllable].phoneV[P3] == 1)) { in pam_adapter_backward_step()
4620 pam->nCurrSyllable--; in pam_adapter_backward_step()
4624 && (pam->sSyllFeats[pam->nCurrSyllable].phoneV[P4] == 1)) { in pam_adapter_backward_step()
4628 pam->nCurrSyllable--; in pam_adapter_backward_step()
4634 pam->nCurrSyllable--; in pam_adapter_backward_step()
4639 pam->nCurrSyllable = nSyll; in pam_adapter_backward_step()
4642 pam->nCurrSyllable = 0; in pam_adapter_backward_step()
4643 pam->nSyllPhoneme = 0; in pam_adapter_backward_step()
4663 pam_subobj_t *pam; in pam_do_pause() local
4667 pam = (pam_subobj_t *) this->subObj; in pam_do_pause()
4668 syllCurr = pam->nCurrSyllable; in pam_do_pause()
4671 if (pam->nCurrSyllable > 0) { in pam_do_pause()
4672 pam->sSyllFeats[pam->nCurrSyllable].phoneV[A3] in pam_do_pause()
4673 = pam->sSyllFeats[pam->nCurrSyllable - 1].phoneV[B3]; in pam_do_pause()
4674 pam->sSyllFeats[pam->nCurrSyllable].phoneV[B8] in pam_do_pause()
4675 = pam->sSyllFeats[pam->nCurrSyllable - 1].phoneV[B8]; in pam_do_pause()
4676 pam->sSyllFeats[pam->nCurrSyllable].phoneV[B10] in pam_do_pause()
4677 = pam->sSyllFeats[pam->nCurrSyllable - 1].phoneV[B10]; in pam_do_pause()
4678 pam->sSyllFeats[pam->nCurrSyllable].phoneV[B12] in pam_do_pause()
4679 = pam->sSyllFeats[pam->nCurrSyllable - 1].phoneV[B12]; in pam_do_pause()
4680 pam->sSyllFeats[pam->nCurrSyllable].phoneV[B14] in pam_do_pause()
4681 = pam->sSyllFeats[pam->nCurrSyllable - 1].phoneV[B14]; in pam_do_pause()
4682 pam->sSyllFeats[pam->nCurrSyllable].phoneV[B17] in pam_do_pause()
4683 = pam->sSyllFeats[pam->nCurrSyllable - 1].phoneV[B17]; in pam_do_pause()
4684 pam->sSyllFeats[pam->nCurrSyllable].phoneV[B19] in pam_do_pause()
4685 = pam->sSyllFeats[pam->nCurrSyllable - 1].phoneV[B19]; in pam_do_pause()
4686 pam->sSyllFeats[pam->nCurrSyllable].phoneV[B20] in pam_do_pause()
4687 = pam->sSyllFeats[pam->nCurrSyllable - 1].phoneV[B20]; in pam_do_pause()
4688 pam->sSyllFeats[pam->nCurrSyllable].phoneV[B21] in pam_do_pause()
4689 = pam->sSyllFeats[pam->nCurrSyllable - 1].phoneV[B21]; in pam_do_pause()
4691 pam->sSyllFeats[pam->nCurrSyllable].phoneV[D2] in pam_do_pause()
4692 = pam->sSyllFeats[pam->nCurrSyllable - 1].phoneV[E2]; in pam_do_pause()
4693 pam->sSyllFeats[pam->nCurrSyllable].phoneV[G1] in pam_do_pause()
4694 = pam->sSyllFeats[pam->nCurrSyllable - 1].phoneV[H1]; in pam_do_pause()
4695 pam->sSyllFeats[pam->nCurrSyllable].phoneV[G2] in pam_do_pause()
4696 = pam->sSyllFeats[pam->nCurrSyllable - 1].phoneV[H2]; in pam_do_pause()
4698 pam->sSyllFeats[pam->nCurrSyllable].phoneV[E5] in pam_do_pause()
4699 = pam->sSyllFeats[pam->nCurrSyllable - 1].phoneV[E5]; in pam_do_pause()
4700 pam->sSyllFeats[pam->nCurrSyllable].phoneV[E7] in pam_do_pause()
4701 = pam->sSyllFeats[pam->nCurrSyllable - 1].phoneV[E7]; in pam_do_pause()
4702 pam->sSyllFeats[pam->nCurrSyllable].phoneV[E9] in pam_do_pause()
4703 = pam->sSyllFeats[pam->nCurrSyllable - 1].phoneV[E9]; in pam_do_pause()
4704 pam->sSyllFeats[pam->nCurrSyllable].phoneV[E11] in pam_do_pause()
4705 = pam->sSyllFeats[pam->nCurrSyllable - 1].phoneV[E11]; in pam_do_pause()
4706 pam->sSyllFeats[pam->nCurrSyllable].phoneV[E12] in pam_do_pause()
4707 = pam->sSyllFeats[pam->nCurrSyllable - 1].phoneV[E12]; in pam_do_pause()
4708 pam->sSyllFeats[pam->nCurrSyllable].phoneV[E13] in pam_do_pause()
4709 = pam->sSyllFeats[pam->nCurrSyllable - 1].phoneV[E13]; in pam_do_pause()
4710 pam->sSyllFeats[pam->nCurrSyllable].phoneV[E13] in pam_do_pause()
4711 = pam->sSyllFeats[pam->nCurrSyllable - 1].phoneV[E13]; in pam_do_pause()
4713 pam->sSyllFeats[pam->nCurrSyllable].phoneV[H1] in pam_do_pause()
4714 = pam->sSyllFeats[pam->nCurrSyllable - 1].phoneV[H1]; in pam_do_pause()
4715 pam->sSyllFeats[pam->nCurrSyllable].phoneV[H2] in pam_do_pause()
4716 = pam->sSyllFeats[pam->nCurrSyllable - 1].phoneV[H2]; in pam_do_pause()
4717 pam->sSyllFeats[pam->nCurrSyllable].phoneV[H3] in pam_do_pause()
4718 = pam->sSyllFeats[pam->nCurrSyllable - 1].phoneV[H3]; in pam_do_pause()
4719 pam->sSyllFeats[pam->nCurrSyllable].phoneV[H4] in pam_do_pause()
4720 = pam->sSyllFeats[pam->nCurrSyllable - 1].phoneV[H4]; in pam_do_pause()
4723 pam->sSyllFeats[pam->nCurrSyllable].phoneV[A3] in pam_do_pause()
4724 =pam->sSyllFeats[pam->nCurrSyllable].phoneV[B8] in pam_do_pause()
4725 = pam->sSyllFeats[pam->nCurrSyllable].phoneV[B10] in pam_do_pause()
4726 = pam->sSyllFeats[pam->nCurrSyllable].phoneV[B12] in pam_do_pause()
4727 = pam->sSyllFeats[pam->nCurrSyllable].phoneV[B14] in pam_do_pause()
4728 = pam->sSyllFeats[pam->nCurrSyllable].phoneV[B17] in pam_do_pause()
4729 = pam->sSyllFeats[pam->nCurrSyllable].phoneV[B19] in pam_do_pause()
4730 = pam->sSyllFeats[pam->nCurrSyllable].phoneV[B20] in pam_do_pause()
4731 = pam->sSyllFeats[pam->nCurrSyllable].phoneV[B21] in pam_do_pause()
4732 = pam->sSyllFeats[pam->nCurrSyllable].phoneV[E5] in pam_do_pause()
4733 = pam->sSyllFeats[pam->nCurrSyllable].phoneV[E9] in pam_do_pause()
4734 = pam->sSyllFeats[pam->nCurrSyllable].phoneV[E11] in pam_do_pause()
4735 = pam->sSyllFeats[pam->nCurrSyllable].phoneV[E12] in pam_do_pause()
4736 = pam->sSyllFeats[pam->nCurrSyllable].phoneV[H1] in pam_do_pause()
4737 = pam->sSyllFeats[pam->nCurrSyllable].phoneV[H2] in pam_do_pause()
4738 = pam->sSyllFeats[pam->nCurrSyllable].phoneV[H3] in pam_do_pause()
4742 pam->sSyllFeats[pam->nCurrSyllable].phoneV[H4] in pam_do_pause()
4743 = pam->sSyllFeats[pam->nCurrSyllable].phoneV[J3]; in pam_do_pause()
4744 pam->sSyllFeats[pam->nCurrSyllable].phoneV[H5] = PICOPAM_p; in pam_do_pause()
4749 if (pam->nCurrSyllable < pam->nTotalSyllables - 1) { in pam_do_pause()
4751 pam->sSyllFeats[pam->nCurrSyllable].phoneV[C3] in pam_do_pause()
4752 = pam->sSyllFeats[pam->nCurrSyllable + 1].phoneV[B3]; in pam_do_pause()
4753 pam->sSyllFeats[pam->nCurrSyllable].phoneV[F2] in pam_do_pause()
4754 = pam->sSyllFeats[pam->nCurrSyllable + 1].phoneV[E2]; in pam_do_pause()
4755 pam->sSyllFeats[pam->nCurrSyllable].phoneV[I1] in pam_do_pause()
4756 = pam->sSyllFeats[pam->nCurrSyllable + 1].phoneV[H1]; in pam_do_pause()
4757 pam->sSyllFeats[pam->nCurrSyllable].phoneV[I2] in pam_do_pause()
4758 = pam->sSyllFeats[pam->nCurrSyllable + 1].phoneV[H2]; in pam_do_pause()
4761 pam->sSyllFeats[pam->nCurrSyllable].phoneV[C3] in pam_do_pause()
4762 = pam->sSyllFeats[pam->nCurrSyllable].phoneV[F2] in pam_do_pause()
4763 = pam->sSyllFeats[pam->nCurrSyllable].phoneV[I1] in pam_do_pause()
4764 = pam->sSyllFeats[pam->nCurrSyllable].phoneV[I2] in pam_do_pause()
4769 pam->sSyllFeats[pam->nCurrSyllable].phoneV[B18] = 0; in pam_do_pause()
4784 register pam_subobj_t * pam; in pam_adapter_do_pauses() local
4790 pam = (pam_subobj_t *) this->subObj; in pam_adapter_do_pauses()
4793 nSyll = pam->nCurrSyllable; in pam_adapter_do_pauses()
4794 while (pam->nCurrSyllable >= 0) { in pam_adapter_do_pauses()
4795 if (pam->sSyllFeats[pam->nCurrSyllable].phoneV[P2] == 1) { in pam_adapter_do_pauses()
4799 pam->nCurrSyllable--; in pam_adapter_do_pauses()
4802 pam->nCurrSyllable = nSyll; in pam_adapter_do_pauses()