alphacep / alphacep/vosk-api

Feature request: Keyphrases with multiple words

Open
#1,231 8 comments 1 reaction 0 assignees View on GitHub
Dominant language
Jupyter Notebook
Stars
15.1k
Forks
1.8k
PR merge metrics
No merged PRs in 30d

Description

EDIT: I now propose a more general `SetSuggestionStrength(0.123)` function instead, see my later posts.

Hello, [my program](https://numenvoice.com) lets people use a computer with their voice.
You type keys with syllables like "air", "bat" and "cap", and can transcribe a sentence after saying "scribe".
I'd like to support phrases with multiple words like "uppercase scribe" and "please caps lock".

Currently, if you specify a grammar like this:
```
["function three", "three two one go", "go forth"]
```
the groupings are only taken as hints and you can still get results like "one function go", as you say here: https://github.com/alphacep/vosk-api/issues/484

It would be great if there was something like `SetKeyphrases(1)` that would constrain the results and return them as words with `SetWords(1)`:
```
{
"result" : [{
"conf" : 1.000000,
"end" : 0.810000,
"start" : 0.120000,
"word" : "go forth"
}, {
"conf" : 1.000000,
"end" : 1.260000,
"start" : 0.840000,
"word" : "function three"
}],
"text" : "go forth function three"
}
```

I have no clue how hard this would be but I think it's a common use case.
If you don't think this will happen, I'll try to recombining the results after the fact, but I'd have to just bail if the result were invalid like "one function three", whereas I'd prefer the best valid match how it his currently when you don't put "[unk]" in the grammar.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.