Re: [kaldi-help] How to write .wav from .ark file?

1,355 views
Skip to first unread message

Peter Smit

unread,
Dec 3, 2016, 3:18:50 AM12/3/16
to kaldi-help
Hi,

First, please refrain from posting to multiple mailing lists at the same time, the developer mailing list is not meant for this kind of questions.

You can use the wav-copy tool to extract a single wav-file from an archive. What you need for this is an accompanying scp file. If you don't have that yet, you can generate it by e.g. running: "wav-copy ark:orig.ark ark,scp:new.ark,new.scp". A line in the scp file will look like:

utt-id new.ark:336166

Now you can use the wav-copy tool to extract a single wav-file by doing "wav-copy new.ark:336166 utt.wav"

There is no way to extract all wav-files at once, but you can easily make some kind of bash script to do that.

Regards,

Peter

On Sat, Dec 3, 2016 at 9:24 AM Ken Geonmin Kim <ken.geo...@gmail.com> wrote:
Hi ! 

I am looking for how to write sound .wav (or .sph) file from given .ark file.

There is binary converting .wav to .ark : featbin/wav-copy

However, there is no binary converting .ark to .wav. , which is what I looking for.


Any suggestion how to do this?


Or how to read sample values of sound with text file?  

featbin/wav-copy does not support writing into text mode.


Thank you !

(Same question is also posted on KALDI-developer forum)

--
You received this message because you are subscribed to the Google Groups "kaldi-help" group.
To unsubscribe from this group and stop receiving emails from it, send an email to kaldi-help+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Daniel Povey

unread,
Dec 3, 2016, 12:12:03 PM12/3/16
to kaldi-help
Or if you know the keys (the recording/utterance-ids) in advance, you
could create an scp file and do
wav-copy wav.ark wav.scp
which writes to the files (note: the wav.scp should already exist).
However, it's unusual that you would actually have wave files in an
.ark file to start with.
Dan
Reply all
Reply to author
Forward
0 new messages