Skip to content

Instantly share code, notes, and snippets.

@slegroux
Last active April 9, 2020 01:56
Show Gist options
  • Save slegroux/cc414bf9f64bfdfef0688ba2fb04c762 to your computer and use it in GitHub Desktop.
Save slegroux/cc414bf9f64bfdfef0688ba2fb04c762 to your computer and use it in GitHub Desktop.
read wave specifier
void ReadWaveSpecifier(){
std::string wav_rspecifier = "scp:data/wav.scp";
SequentialTableReader<WaveHolder> wav_reader(wav_rspecifier);
for (; !wav_reader.Done(); wav_reader.Next()){
std::string key = wav_reader.Key();
WaveData wave_data = wav_reader.Value();
cout << "wav_spec dur: "<<wave_data.Duration()<<endl;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment