⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 write_binhmmlist.c

📁 julius version 4.12.about sound recognition.
💻 C
字号:
/** * @file   write_hmmlist.c *  * <JA> * @brief  HMMListファイルをバイナリ妨及で叫蜗する * </JA> *  * <EN> * @brief  Write HMMList data to binary file * * </EN> *  * @author Akinobu LEE * @date   Wed Feb 16 04:04:23 2005 * * $Revision: 1.1 $ *  *//* * Copyright (c) 1991-2007 Kawahara Lab., Kyoto University * Copyright (c) 2000-2005 Shikano Lab., Nara Institute of Science and Technology * Copyright (c) 2005-2007 Julius project team, Nagoya Institute of Technology * All rights reserved */#include <sent/stddefs.h>#include <sent/htk_hmm.h>#include <sent/ptree.h>static booleansave_hmmlist_callback(void *data, FILE *fp){  HMM_Logical *l = data;  char *s;  int len;  if (myfwrite(&(l->is_pseudo), sizeof(boolean), 1, fp) < 1) return FALSE;  len = strlen(l->name) + 1;  if (myfwrite(&len, sizeof(int), 1, fp) < 1) return FALSE;  if (myfwrite(l->name, len, 1, fp) < 1) return FALSE;  if (l->is_pseudo) {    s = l->body.pseudo->name;  } else {    s = l->body.defined->name;  }  len = strlen(s) + 1;  if (myfwrite(&len, sizeof(int), 1, fp) < 1) return FALSE;  if (myfwrite(s, len, 1, fp) < 1) return FALSE;    return TRUE;}booleansave_hmmlist_bin(FILE *fp, HTK_HMM_INFO *hmminfo){  /* set mark */  int x = 0;  if (myfwrite(&x, sizeof(int), 1, fp) < 1) {    jlog("Error: save_hmmlist_bin: failed to write hmmlist to binary file\n");    return FALSE;  }  if (aptree_write(fp, hmminfo->logical_root, save_hmmlist_callback) == FALSE) {    jlog("Error: save_hmmlist_bin: failed to write hmmlist to binary file\n");    return FALSE;  }  return TRUE;}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -