HTK HCompV:输入文件不是RIFF格式

时间:2015-09-22 18:10:49

标签: htk

我试图使用HTK并相应地设置项目。我成功地使用HCopy对训练数据进行了编码,但在尝试执行时:

HCompV -C config -f 0.01 -m -S codetr.scp -M hmm0 proto

我收到以下错误:

ERROR [+6251] Input file is not in RIFF format
ERROR [+6213] OpenWaveInput: Get[format]HeaderInfo failed
ERROR [+6313] OpenAsChannel: OpenWaveInput failed
ERROR [+6316] OpenBuffer: OpenAsChannel failed
ERROR [+2050] LoadFile: Config parameters invalid
FATAL ERROR - Terminating program

作为参考,我在MSYS shell中运行它,配置如下:

# Coding parameters
SOURCEFORMAT = WAV # We read in .wav files
TARGETKIND = MFCC_0_D_A # Identifier for coefficients
TARGETRATE = 100000.0 # 10ms = frame periodicity
SAVECOMPRESSED = T
SAVEWITHCRC = T
WINDOWSIZE = 250000.0 # 25ms = time frame length
USEHAMMING = T # Use of Hamming function for windowing
PREEMCOEF = 0.97 # Pre-emphasis coefficient
NUMCHANS = 26 # Number of filterbank channels
CEPLIFTER = 22 # Length of cepstral filtering
NUMCEPS = 12 # Number of MFCC coefficients
ENORMALISE = F # Normalise intensity of data

proto文件如下:

~o <VecSize> 39 <MFCC_0_D_A>
~h "proto"
<BeginHMM>
  <NumStates> 5
  <State> 2
    <Mean> 39
      0.0 0.0 0.0 0.0 ...
    <Variance> 39
      1.0 1.0 1.0 1.0 ...
  <State> 3
    <Mean> 39
      0.0 0.0 0.0 0.0 ...
    <Variance> 39
      1.0 1.0 1.0 1.0 ...
  <State> 4
    <Mean> 39
      0.0 0.0 0.0 0.0 ...
    <Variance> 39
      1.0 1.0 1.0 1.0 ...
  <TransP> 5
    0.0 1.0 0.0 0.0 0.0
    0.0 0.6 0.4 0.0 0.0
    0.0 0.0 0.6 0.4 0.0
    0.0 0.0 0.0 0.7 0.3
    0.0 0.0 0.0 0.0 0.0
<EndHMM>

和codetr.scp文件如下(所有文件都存在):

samples/cough1.wav samples/cough1.mfc
samples/cough2.wav samples/cough2.mfc
samples/cough3.wav samples/cough3.mfc
samples/cough4.wav samples/cough4.mfc
samples/silence1.wav samples/silence1.mfc
samples/silence2.wav samples/silence2.mfc
samples/silence3.wav samples/silence3.mfc
samples/silence4.wav samples/silence4.mfc

感谢任何和所有帮助!

1 个答案:

答案 0 :(得分:0)

您检查过输入文件格式吗?在unix / linux上,你可以尝试文件[filename]。发布测试结果。可以使用诸如audacity之类的工具转换为RIFF格式。