Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: simple coqui-ai stt integration #341

Merged
merged 4 commits into from
Jan 31, 2022

Conversation

johannbarbie
Copy link
Contributor

What type of change does this PR introduce?

  • Bugfix
  • Feature
  • Refactor
  • Documentation
  • Not Sure?

Does this PR introduce breaking changes?

  • Yes
  • No

List any relevant issue numbers:

Description:

This adds Coqui for offline STT. The parser is a copy of the deepspeech version. It works for me with node 16 and mac.

I have no prior experience with Leon or Coqui STT, so this might be very irrelevant or incomplete, let me know.

scripts/check.js Outdated
} else {
log.success(`Found DeepSpeech language model at ${deepSpeechPath}`)
log.success(`Found DeepSpeech language model at ${coquiPath}`)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: s/DeepSpeech language model/Coqui acoustic model/

Coqui (like DeepSpeech) has both an acoustic model and a language model. The acoustic model is model.tflite and the language model ends in *.scorer. Here you're checking for coquiPath, which has been set to the acoustic model

const tmpDir = 'scripts/tmp'
const deepSpeechVersion = '0.9.3'
const coquiVersion = '1.0.0'
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

s/1.0.0/1.1.0/

Copy link
Contributor Author

@johannbarbie johannbarbie Jan 24, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i couldn't find a v1.1.0 here: https://github.com/coqui-ai/STT-models/tree/main/english/coqui, so i've renamed the variable to coquiModelVersion to distinguish it from the release version.


/* istanbul ignore next */
try {
STT = require('stt-gpu') // eslint-disable-line global-require, import/no-unresolved
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Coqui only releases TFLite models, so there's no GPU needed. stt-gpu is depreciated. You can read more detail here.

@@ -10,7 +10,8 @@ class Stt {
this.providers = [
'deepspeech',
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

s/deepspeech/coqui/

Copy link

@reuben reuben left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Thanks for integrating Coqui STT! :)

@louistiti louistiti merged commit 4d644ce into leon-ai:develop Jan 31, 2022
@louistiti
Copy link
Member

Hi @johannbarbie 👋,

I just tried and it works out of the box. That is neat, thanks 👍

The docs and new landing page will be updated in the coming minutes according to these changes.

@JRMeyer @reuben, thanks for your support!

@JRMeyer
Copy link

JRMeyer commented Jan 31, 2022

New landing page looks slick 😊👍

Is there somewhere I should upload a high res logo for Coqui?

@louistiti
Copy link
Member

louistiti commented Jan 31, 2022

New landing page looks slick 😊👍

Is there somewhere I should upload a high res logo for Coqui?

Thanks! Would it be possible to send a SVG logo of Coqui on Discord?
Here is my Discord ID:
Louistiti 🇨🇳#7928

@louistiti
Copy link
Member

All nodes have been updates as mentioned in #329 (comment).

@JRMeyer I used this SVG and added the Coqui color to it. Please let me know if you still prefer to change it. Same as the docs, if you'd like to add/change something, do not hesitate 😉

@JRMeyer
Copy link

JRMeyer commented Jan 31, 2022

looks great :D

FYI - there are two French Coqui STT models [1, 2] and our community is training more :)

@louistiti
Copy link
Member

@louistiti louistiti added this to the 1.0.0-beta.6 milestone Feb 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants