Transcribing Speech - Word correction/replacement

Hello everybody,

A great trigger was recently added to BTT which is called "Start / Stop Dictation / Recognizing / Transcribing Speech".
I use this feature a lot and it generally works well, thank you BTT-Developers :smiley:
I have noticed that the feature has problems with the transcription of people's names, company names, and specific technical terms.
If you say, "Dear Mr. Müller, are you available tomorrow?
» BTT turns it into "Dear Mr. Miller, are you available tomorrow?
Or if I set the language to German and ask:
"Hallo Pavneet, hast du morgen Zeit zum telefonieren?
» BTT turns it into "Hallo Pavlovic, hast du morgen Zeit zum telefonieren?"
I have used the tool Spokenly in the past, and they "fixed" this problem by offering a "word-replacement dictionary" that changes wrongly transcribed words to the correct spelling (see link and picture below).

Does BTT offer a word replacement dictionary/function too, and was I simply unable to figure this out, or would this have to be added by the BTT developers?
I did my best to find a solution on my own but found none.

Please advise and thanks for any suggestions in advance. :slight_smile:

BTW:
Maybe there is even a better solution to this issue than offering a word-replacement dictionary.
If one could record the pronunciation of specific words in a 'pronunciation dictionary' and BTT would check and recognize these pronunciations, then this would be an ideal solution because it tackles the problem right at the transcription phase and not after it.
The word-replacement dictionary appears to be a functionally simple but messy fix because it comes in at the very end of the process to "clean up after" the mistakes made by the transcription.
The word-replacement dictionary also can't consider the individual pronunciation of human beings, which differs in accordance with the origin of a speaker. An English speaker from Austin (Texas) will obviously have a different pronunciation than a speaker from New York City.

https://spokenly.app/docs/word-replacements

the macOS api used allows for custom vocabularies that increase the probability of that word / phrase being recognized correctly. I have added support for specifying a custom vocabulary in 6.707:

Unfortunately providing "pronunciation maps" is a whole lot more complex (requires custom model additions). I'll check whether there are any examples online for something like this, but I think I currently can't support this.

Hi Andreas,

That's the fastest reply and fix that I have ever received :grinning_face: Thank you for taking your time on a saturday to tackle this issue :folded_hands:
I immediately downloaded the alpha version to test and have noticed the following:

  1. First and most foremost: The mechanism seems to work :blush:

  2. Please take a look at the screenshot below.
    In the beginning I entered the words into the wrong box. I put the wrongly transcribed words into the top box "Vocabulary" and entered the correct words in the bottom box under "Replacements" because I understood it exactly the other way around.
    I usually pick up on how things work rather fast, so maybe you could improve a little on making clearer what is to be entered into which box... OR maybe I am the problem and everyone else will understand it immediately :wink:
    If you are interested, here is my suggestion (see mockup picture below):
    Change the label "Vocabulary" to "Correction (enter correct word into this box)".
    Change the label "Replacement" to "Recognized (enter wrong word into this box)".
    Last comment regarding this aspect: You can, of course, choose not to change your labels, just please add a little further explanation that makes clear to the user what to enter into the boxes.
    3) A question:
    How does the matching mechanism know which wrongly transcribed word to replace with the correct word? I would have expected some 1-to-1 matching UI window. But it seems like the user can just randomly enter words into both boxes, and the mechanism will still get it right.
    I mixed up my list on purpose and your mechanism still picked the correct replacement :open_mouth:
    How does this work, and is this solution as reliable as creating a rigid 1-to-1 match like you can see on the Spokenly screenshot of my initial message?
    BTW: Most names in my list are fictitious but they are good enough for our testing purposes :wink:

    UI labeling Mockup:

The words you entered into the second text area actually won't have any effect like that. The format for Spokenly style replacements is

"recognized => replaced"

That replacement will be applied after recognition has finished.

So for example

In contrast the vocabulary is used during evaluation / ranking. So if a similar word is detected it will instead use the one from the vocabulary unless the similar one has been detected with very high confidence. So instead of replacing a given phrase / word it will directly try to recognize the ones from the vocabulary correctly.

Hi Andreas,

Ahhhhh, now I understand :light_bulb:
I believe that these two features, which you added today in rapid time, will be very useful for everyone who uses this trigger/action. This is a major improvement!
Great work, thank you :folded_hands: