silvius icon indicating copy to clipboard operation
silvius copied to clipboard

adding grammar - new characters/commands

Open KanoczTomas opened this issue 6 years ago • 6 comments

Hello,

first of all a wonderful project and presentation(found it on youtube). I myself have a problem with writing due to my neck injury. I find this project very helpful.

Can you please post an example how I can extend the grammar?

  • e.g. I can see single/double quotes are not working, can you help me fix that?
  • noticed one can not include numbers (number three - this is not working, would be nice)
  • is it possible to train the system to my voice? It has trouble differencing between right and rate in my case, not a native english speaker it is hard to pronounce those so that it recognizes them. Perhaps if you show how I can change the word for left bracket it would help :)
  • there is no curly braces command/word
  • the letter x can not be written, as xray is not recognised. x. ray is many times written instead (as seen when I run the script) - edit: I just found it is expert for x :)

Please add a bitcoin address to the page so I can tip you :)

KanoczTomas avatar Nov 10 '17 17:11 KanoczTomas

Thanks for your interest!

  • single/double quotes were broken; I just pushed a fix to master. Basically, the parser used to have a separate list of words for its lexer which I sometimes forgot to update. Now the list of terminals is automatically determined from the parser. Try "single quote".
  • I added "number (one|two|...)"
  • I did not add curly braces but here's how. Look up the xkeysyms name for your character (https://www.cl.cam.ac.uk/~mgk25/ucs/keysymdef.h), i.e. here it's probably braceleft and braceright. Test whether it's right by running xdotool key braceleft. Then add this to grammar/main.py in the p_character function, you'll need to add character ::= lace and 'lace': 'braceleft', and that's it.
  • I did not enable it, but the underlying system supports a "speaker customization" feature which will learn your own voice. If you're interested in this I can try to find out more. However, the current speech model is only of decent quality; you would probably get higher accuracy by retraining a new kaldi model. This is quite an undertaking though. You can prepare for it by running your own silvius server and recording each phrase (I think this is the default) to use yourself as training data.
  • 'x. ray' is an unfortunate consequence of the dictionary which I could have fixed but instead I just added 'expert' :/

dwks avatar Nov 22 '17 02:11 dwks

P.S. Using a higher quality microphone provides pretty good improvement in recognition accuracy! See my HOPE XI talk for details. Be sure to join the mailing list if you haven't already. One of these days I'm going to make some new models for Silvius. I also wrote a Google-based backend for Silvius which is fairly close to being ready for release.

Also haha if you insist: bitcoin 3DKqbQNndAyCMbjj3jpGTxPqTozDRW4kkZ

dwks avatar Nov 22 '17 02:11 dwks

:+1: very interested in the google based backend, trying out aenea right now and well.. it's a bit cumbersome to setup ;)

piotrpalek avatar Nov 23 '17 00:11 piotrpalek

OK! Well, do you want to beta test my Google backend? If so please send me an email, you can find my address on my website elfery.net.

dwks avatar Nov 23 '17 01:11 dwks

Hi @dwks , I am trying to find your commit, but the last I see is july 23rd. Is it a different repo, or am I doing something wrong?

Btw that google backend sounds great. Will send you an email, would love to help test out as well.

KanoczTomas avatar Nov 29 '17 10:11 KanoczTomas

The last commit is from July 30th. I wrote it in a different branch and didn't push it, wanted to test it more but it seems fine! It's this current repo, https://github.com/dwks/silvius

Sent you a message about the google backend!

dwks avatar Nov 29 '17 13:11 dwks