vosk-browser icon indicating copy to clipboard operation
vosk-browser copied to clipboard

Library Documentation and Numbers as non text

Open DanielUsselmann opened this issue 2 years ago • 4 comments

I have two questions:

  1. Is there a documentation for the library available for any parameters that can be set?

  2. Is there the possibility to get numbers as number and not as text: User says "100" the recognizer outputs "one hundred" I want to get the 100 as output without writing a mapping function.

DanielUsselmann avatar Jan 17 '24 20:01 DanielUsselmann

Re #1, I know "better documentation" is on the TODO list. But I will tell you how I usually figure it out:

  • https://github.com/ccoreilly/vosk-browser/blob/master/src/bindings.cc - shows the methods on Recognizer that can be called.
  • https://github.com/alphacep/vosk-api/blob/7012103b3bc7a3da67faf9eb452991e60fcd8af7/src/recognizer.cc - shows the implementation of each method of the Recognizer class.

That is still quite convoluted, and kinda asks a JS dev to know C++. One of these days, I would like to get a build of vosk-browser working and see if I contribute docs or something else like that to the project.

Re #2, no comment other than that I like the idea.

IANAMaintainer

erikh2000 avatar Jan 18 '24 01:01 erikh2000

Ok thanks. I will try to use your method.

So your planning to add a parameter for "just recognizing" numbers ? Because currently I need to map it from text to numbers. Or do you have another idea ?

DanielUsselmann avatar Jan 19 '24 20:01 DanielUsselmann

To be clear, I'm not the maintainer. Just another user like you.

But it occurs to me that converting number text to numbers is possible, useful to me as well as you, and might be a worthy PR for vosk-web or some other open source add on.

It amounts to a function that takes text as input, parses cleverly according to language-specific rulesets, and replaces text with numbers.

On Fri, Jan 19, 2024, 12:41 PM DanielUsselmann @.***> wrote:

Ok thanks. I will try to use your method.

So your planning to add a parameter for "just recognizing" numbers ? Because currently I need to map it from text to numbers. Or do you have another idea ?

— Reply to this email directly, view it on GitHub https://github.com/ccoreilly/vosk-browser/issues/79#issuecomment-1901083688, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACB3GHTENYAJ5VGEIQONB4TYPLK6VAVCNFSM6AAAAABB7FJLXKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSMBRGA4DGNRYHA . You are receiving this because you commented.Message ID: @.***>

erikh2000 avatar Jan 19 '24 21:01 erikh2000

Okay understand.

I am currently developing this "Converter" by myself, but of course not for every language..

DanielUsselmann avatar Jan 19 '24 21:01 DanielUsselmann