# ML for Audio Study Group - pyctcdecode (Jan 18)

**URL:** <https://discuss.huggingface.co/t/ml-for-audio-study-group-pyctcdecode-jan-18/13561>\
**Category:** Community Calls\
**Created:** [January 10, 2022, 9:01pm UTC](https://discuss.huggingface.co/t/ml-for-audio-study-group-pyctcdecode-jan-18/13561 "2022-01-10T21:01:20Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![osanseviero](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/osanseviero/32/38738_2.png) [@osanseviero](https://discuss.huggingface.co/u/osanseviero)\
**Post date:** [January 10, 2022, 9:01pm UTC](https://discuss.huggingface.co/t/ml-for-audio-study-group-pyctcdecode-jan-18/13561/1 "2022-01-10T21:01:20Z")

</div>

Welcome to the fourth session of ML for Audio Study Group! 🔊 🔊

We have a very special webinar organized for you! The Kensho team will join us to give a cool presentation of [pyctcdecode](https://github.com/kensho-technologies/pyctcdecode).

**Topic** : pyctcdecode: A simple and fast speech-to-text prediction decoding algorithm

**Speakers**

- **Raymond Grossman** (LinkedIn: [www.linkedin.com/in/raymond-grossman-bb4664114](http://www.linkedin.com/in/raymond-grossman-bb4664114))  
Raymond works as a machine learning engineer at Kensho Technologies, specializing in speech and natural language domains. Prior to coming to Kensho, he studied mathematics at Princeton and was an avid Kaggler under the moniker @ToTrainThemIsMyCause.
- **Jeremy Lopez** (LinkedIn: [https://www.linkedin.com/in/jeremy-lopez-9107b613a](https://www.linkedin.com/in/jeremy-lopez-9107b613a))  
Jeremy is a machine learning engineer at Kensho Technologies and has worked on a variety of different topics including search and speech recognition. Before working at Kensho, he earned a PhD in experimental particle physics at MIT and continued doing physics research as a postdoc at the University of Colorado Boulder.

**Suggested Resources (If you want to jump ahead)**

- [Beam Search Decoding in CTC-trained Neural Networks](https://towardsdatascience.com/beam-search-decoding-in-ctc-trained-neural-networks-5a889a3d85a7)
- [pyctcdecode — A new beam search decoder for CTC speech recognition](https://blog.kensho.com/pyctcdecode-a-new-beam-search-decoder-for-ctc-speech-recognition-2be3863afa96)

**How to join**

- Watch the livestream in [YouTube](https://www.youtube.com/watch?v=CDuvVL0z_xk&ab_channel=HuggingFace).
- Join in our Discord (hf.co/join/discord at the channel #ml-4-audio-study-group).
- Check out the [GitHub repository](https://github.com/Vaibhavs10/ml-with-audio) of the project.

**You can post all your questions in this topic! They will be answered during the session**

---

<div class="post-metadata">

**Author:** ![Iskaj](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/iskaj/32/3762_2.png) [@Iskaj](https://discuss.huggingface.co/u/Iskaj)\
**Post date:** [January 17, 2022, 12:33pm UTC](https://discuss.huggingface.co/t/ml-for-audio-study-group-pyctcdecode-jan-18/13561/2 "2022-01-17T12:33:51Z")

</div>

I was wondering how the hotword boosting is implemented. Is it simply changing the probabilities of the language model by a factor of _x_ or is it something _fancy_?

---

<div class="post-metadata">

**Author:** ![reach-vb](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/reach-vb/32/12715_2.png) [@reach-vb](https://discuss.huggingface.co/u/reach-vb)\
**Post date:** [January 18, 2022, 1:03pm UTC](https://discuss.huggingface.co/t/ml-for-audio-study-group-pyctcdecode-jan-18/13561/3 "2022-01-18T13:03:58Z")

</div>

What is the future roadmap for pyctcdecode?

---

<div class="post-metadata">

**Author:** ![hoony](https://avatars.discourse-cdn.com/v4/letter/h/7ab992/32.png) [@hoony](https://discuss.huggingface.co/u/hoony)\
**Post date:** [January 18, 2022, 1:12pm UTC](https://discuss.huggingface.co/t/ml-for-audio-study-group-pyctcdecode-jan-18/13561/4 "2022-01-18T13:12:13Z")

</div>

- how many hotwords can we add to the lm?
- how long does the build take?
- can pyctcdecode handle foreign languages such as korean?

---

<div class="post-metadata">

**Author:** ![mpierrau](https://avatars.discourse-cdn.com/v4/letter/m/439d5e/32.png) [@mpierrau](https://discuss.huggingface.co/u/mpierrau)\
**Post date:** [January 18, 2022, 3:26pm UTC](https://discuss.huggingface.co/t/ml-for-audio-study-group-pyctcdecode-jan-18/13561/5 "2022-01-18T15:26:34Z")

</div>

Hi! I am also interested in this topic - how is it implemented and what is the maths behind it? Please feel free to really dig deep into the details 🙂 Unfortunately I won’t be able to join this afternoon, but will watch the stream afterwards!

---

<div class="post-metadata">

**Author:** ![mpierrau](https://avatars.discourse-cdn.com/v4/letter/m/439d5e/32.png) [@mpierrau](https://discuss.huggingface.co/u/mpierrau)\
**Post date:** [January 18, 2022, 3:35pm UTC](https://discuss.huggingface.co/t/ml-for-audio-study-group-pyctcdecode-jan-18/13561/6 "2022-01-18T15:35:51Z")

</div>

Furthermore I stumbled upon this discussion on your GitHub: [Difficulty seeing meaningful changes with hotword boosting · Issue #18 · kensho-technologies/pyctcdecode · GitHub](https://github.com/kensho-technologies/pyctcdecode/issues/18)

A user is having issues where he’s not seeing meaningful differences when using hotwords, even if upweighting the words to a very large number (like 9999999.0). I tried this myself and had the same experience. Can you please elaborate on this issue and if you have made any attempts to make it easier for users to finetune their LM:s for this specific purpose?

---

<div class="post-metadata">

**Author:** ![Maryamas](https://avatars.discourse-cdn.com/v4/letter/m/db5fbb/32.png) [@Maryamas](https://discuss.huggingface.co/u/Maryamas)\
**Post date:** [January 18, 2022, 3:40pm UTC](https://discuss.huggingface.co/t/ml-for-audio-study-group-pyctcdecode-jan-18/13561/7 "2022-01-18T15:40:42Z")

</div>

Hi. Thanks a lot for organizing this study group.  
1- Please explain different approaches like Viterbi, WSFT, and beam search? What are the differences?  
Please compare them in terms of accuracy and efficiency, too.

2- How to choose beam size for beam search? What is the best value or range for beam size especially if we want to compare different methods in reporting in a research paper?

3- Is beam size related to the acoustic model? Is it true that some models need a larger beam size for generating reasonable text sequences?

4- How to choose the number of subword pieces in BPE for decoding?  
Thanks again.

---

<div class="post-metadata">

**Author:** ![Iskaj](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/iskaj/32/3762_2.png) [@Iskaj](https://discuss.huggingface.co/u/Iskaj)\
**Post date:** [January 18, 2022, 4:17pm UTC](https://discuss.huggingface.co/t/ml-for-audio-study-group-pyctcdecode-jan-18/13561/8 "2022-01-18T16:17:15Z")

</div>

During the training of a STT system, let’s say Wav2Vec 2.0, do we include the language model (so we do CTC-decoding with an LM) during training?

---

<div class="post-metadata">

**Author:** ![Maryamas](https://avatars.discourse-cdn.com/v4/letter/m/db5fbb/32.png) [@Maryamas](https://discuss.huggingface.co/u/Maryamas)\
**Post date:** [January 18, 2022, 4:46pm UTC](https://discuss.huggingface.co/t/ml-for-audio-study-group-pyctcdecode-jan-18/13561/10 "2022-01-18T16:46:59Z")

</div>

Can we use it for rnn-based and attention based models to generate text?

---

<div class="post-metadata">

**Author:** ![phantomcoder1996](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/phantomcoder1996/32/3784_2.png) [@phantomcoder1996](https://discuss.huggingface.co/u/phantomcoder1996)\
**Post date:** [January 18, 2022, 4:48pm UTC](https://discuss.huggingface.co/t/ml-for-audio-study-group-pyctcdecode-jan-18/13561/11 "2022-01-18T16:48:56Z")

</div>

Is it possible to use acoustic models with phoneme output with pyctc decode and add a lexicon?

---

<div class="post-metadata">

**Author:** ![Maryamas](https://avatars.discourse-cdn.com/v4/letter/m/db5fbb/32.png) [@Maryamas](https://discuss.huggingface.co/u/Maryamas)\
**Post date:** [January 18, 2022, 6:08pm UTC](https://discuss.huggingface.co/t/ml-for-audio-study-group-pyctcdecode-jan-18/13561/12 "2022-01-18T18:08:27Z")

</div>

Hi. Thanks a lot for organizing this study group.  
1- Please explain different approaches like Viterbi, WSFT, and beam search? What are the differences?  
Please compare them in terms of accuracy and efficiency, too.

2- How to choose beam size for beam search? What is the best value or range for beam size especially if we want to compare different methods in reporting in a research paper?

3- Is beam size related to the acoustic model? Is it true that some models need a larger beam size for generating reasonable text sequences?

4- How to choose the number of subword pieces in BPE for decoding?  
Thanks again.
