speech-translator-ext / speech-translator-readme

This repository outlines the procedures and general information for the Speech Translator project.
https://st.kappaflow.dev
47 stars 2 forks source link

[Feature Request] Add support for improved custom acronym recognition #7

Open hellais opened 1 year ago

hellais commented 1 year ago

First, thanks for a great extension!

For my use case I have to say quite often the name of a project which is an acronym and depending on what I am saying before the voice to text will not detect it properly.

According to this stackoverflow post: https://stackoverflow.com/questions/64177109/better-acronym-recognition-with-google-speech-api-using-speech-adaptation, it's possible to pass to the google speech API a custom speechContext, where you apply a boost to certain phrases such as an acronym:

speechContexts: [ {
    phrases : [
      {
        "value": "OONI",
        "boost": 10
      }
    ]
  } 
]

It would be fantastic if the extension exposed this functionality from the settings so that a user can pass in a list of acronyms (and weights) so that they can be boosted an properly translated.

I'm not sure how the text to translation API integration works exactly, but it would probably be necessary to apply something to that stage as well to ignore translating the acronym (I am assuming it might do some mangling for it).

kappaflow commented 1 year ago

Thank you for your feedback!

Currently I am using Web Speech API. It has SpeechGrammar, I will try to test it, but I wouldn't be surprised if it doesn't really work well.

kappaflow commented 10 months ago

I have done the tests, but it seems like SpeechGrammar functionality doesn't really work, unfortunately...