k2-fsa / k2

FSA/FST algorithms, differentiable, with PyTorch compatibility.
https://k2-fsa.github.io/k2
Apache License 2.0
1.08k stars 211 forks source link

ctc decoding #964

Open xiongjun19 opened 2 years ago

xiongjun19 commented 2 years ago

I have few questions about ctc decoding:
Is there any fast ctc decoding interface, which device does it runs ? GPU or cpu, I think it's hard to do ctc decoding in GPU

csukuangfj commented 2 years ago

Is there any fast ctc decoding interface,

Please see its usage in https://github.com/k2-fsa/icefall/blob/master/egs/librispeech/ASR/conformer_ctc/decode.py, which also supports CTC decoding in batches.

which device does it runs ? GPU or CPU

It depends on which device you want to use. It supports NVIDIA GPU as well as CPU.

I think it's hard to do ctc decoding in GPU

In that case, k2 might be useful for you.


Note: The problem of CTC decoding is converted to find the intersection of two FSAs and CTC decoding is a special case of HLG decoding.

xiongjun19 commented 2 years ago

Is there any fast ctc decoding interface,

Please see its usage in https://github.com/k2-fsa/icefall/blob/master/egs/librispeech/ASR/conformer_ctc/decode.py, which also supports CTC decoding in batches.

which device does it runs ? GPU or CPU

It depends on which device you want to use. It supports NVIDIA GPU as well as CPU.

I think it's hard to do ctc decoding in GPU

In that case, k2 might be useful for you.

Note: The problem of CTC decoding is converted to find the intersection of two FSAs and CTC decoding is a special case of HLG decoding.

thanks, your information is really helpful and I can learn a lot of things from this great project.