how to do force alignment by phnrec?

158 views
Skip to first unread message

donhi

unread,
Aug 12, 2010, 3:36:20 AM8/12/10
to phnrec
like sphinx3_align.exe , how to do force alignment by phnrec? thanks~~

Petr Schwarz

unread,
Aug 12, 2010, 5:24:43 PM8/12/10
to phn...@googlegroups.com
Dear Donhi,

The force alignment can not be done directly by any switch. It is
possible to create a network with linear string of models and word end
nodes.
This can be used for decoding.

Set these lines in the config file:

[decoder]
type=stkint

[networks]
default=$C/net/network
gen_phn_loop=false
gen_kws_net=false

The network is read from the 'network' file and it can be generated by a
script. The network must be generated (and the tool run) for
each speech file separately. Another possibility is to modify the main file.

Petr

Tim Kempton

unread,
Aug 13, 2010, 5:18:22 PM8/13/10
to phn...@googlegroups.com
Hi Petr and Donhi

When I've done forced alignment in the past I adapted the lattice script,
and used the HVite -a option and removed the z,w,n,l options i.e.:

-bash-3.2$ diff lattice.sh tim_forcedAlign.sh
49c49
< -T 1 -y 'rec' -z 'latt' \
---
> -T 1 -y 'rec' \
51,52c51
< -w ${OutputDir}/scoring/monophones_lnet.hvite \
< -n 2 1 \
---
> -a \
55d53
< -l ${OutputDir}/lattice \

The known label file (without timing information) than just needs to go into
the htkout directory, e.g. /tmp/phnrec_lat/htkout/test.lab

This seems to produce good results. Petr - would this produce similar
results to the solution you mention, or is this suboptimal?

I'd be interested to know if anyone has compared the performance of phnrec
forced alignment with the state of the art (e.g. Hosom 2009 on TIMIT).

Thanks,
Tim

Petr Schwarz

unread,
Aug 16, 2010, 12:26:03 PM8/16/10
to phn...@googlegroups.com
Hi Tim,

Thank you for suggestion. Yes, you can use this script. It uses the HVite decoder instead of an internal decoder.
HVite reads the transcription in the HTK label file or MLF (Master Label File).
I have not compared the quality of force alignment yet.

Petr

Emir Ak

unread,
Dec 6, 2016, 5:53:59 PM12/6/16
to phnrec
Dear Tim,

I need to use Bruno phoneme recognizer for forced alignment. Even though I tried to follow your steps, I could not solve my problem.

I have HVite, but I could not use -a option and also couldn't remove z, w, n, l. When I look at the options of Hvite, z, w, n are by default off. Also can you be more specific about lattice.sh? Your help will be appreciated.

Thanks,
Emir

Tim Kempton

unread,
Dec 9, 2016, 9:25:39 AM12/9/16
to phnrec
Dear Emir

I’m glad to hear you are using the Brno phoneme recognizer for forced alignment. I use it myself and still find it competitive as a general purpose forced alignment system.

The lattice.sh script is included with the lattice scriptsː lattice_generation.tgz that you can download from the main PhnRec webpage. Although you won’t be dealing with the lattices directly, see the FAQ for “How to generate phoneme lattices?”. Edit the lattice.sh file as I specified in my previous message. If you are still having problems after you’ve done this, what version of HTK are you using?

Tim
Reply all
Reply to author
Forward
0 new messages