speech signal process tools

源代码在线查看: dir.c

软件大小: 24038 K
上传用户: yuyx2003
关键词: process speech signal tools
下载地址: 免注册下载 普通下载 VIP

相关代码

				/**********************************************************************/				/*                                                                    */				/*             FILENAME:  dir.c                                       */				/*             BY:  Jonathan G. Fiscus                                */				/*                  NATIONAL INSTITUTE OF STANDARDS AND TECHNOLOGY    */				/*                  SPEECH RECOGNITION GROUP                          */				/*                                                                    */				/*           DESC:  This file contains general routines used          */				/*                  throughout the scoring package                    */				/*                                                                    */				/**********************************************************************/				#include 				#include 								#if defined(NARCH_NEXT)				#include 				#else				#include 				#endif								#include 				/***************************************************************/				/*  given a directory, make sure it exists and you have write  */				/*  access                                                     */				/***************************************************************/				dir_exists(dir)				char *dir;				{				    struct dirent *dp, *dpb;				    DIR *dirp;								    if ((dirp = opendir(dir)) == NULL){				        return(0);				    }				    closedir(dirp);				    return(1);				}								/*********************************************************************/				/*   return true if the file with the name 'fname' can be opened     */				/*   for reading                                                     */				/*********************************************************************/				file_readable(fname)				char *fname;				{				    FILE *fp;								    if ((*(fname) == NULL_CHAR) || ((fp=fopen(fname,"r")) == NULL))				        return(0);				    fclose(fp);				    return(1);				}											

相关资源