Detecting specific sentences in a predefined text

First of all, please excuse me if this question is too vague or if I’m asking too obvious question (I’m a complete noob in the topic).
I’d need your guidance on how to best approach the following scenario.

There’s a text known upfront (let’s call it Article). And then someone is reading that Article out loud. Certain sentences (once detected) should trigger external actions (out of scope of DeepSpeech).
So my question is - what actions would you take (if any?) to get the highest detection rate possible. Any extra training on that specific Article?
I mean, how to leverage the finite number of words combination in that Article?

I’d really appreciate any guidance. Thank you.

You need to create a custom scorer with the sentences of the Article you’re mentioning.
Keep in mind if you build a scorer with only sentences from this article, your model won’t be able to recognize much more than the sentences provided. If you have special commands to exit or something, you should also add them to your language model.

Please keep in mind that DeepSpeech code base is not longer maintained, so it’s a good idea to switch over at coqui-ai/STT to get updates and support from the community.

Thanks a lot, Danny.

1 Like