Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Hello, Computer: Writing Ruby With Voice Recognition

Nat Budin
October 27, 2021

Hello, Computer: Writing Ruby With Voice Recognition

Repetitive stress injuries are scary for tech workers. If I can’t type, is my career over?

When my finger was injured last year, I had a long recovery period, and during that time, I learned to code using voice recognition software. In this talk, I’ll tell the whole story and demo the tool I learned.

Nat Budin

October 27, 2021
Tweet

More Decks by Nat Budin

Other Decks in Technology

Transcript

  1. CW: medical stu f I will tell you when I’m

    about to get to the part with a diagram so you can drop and come back
  2. @n a tbudin on Twitter Hi, I’m Nat I work

    a t ActBlue Technic a l Services We’re hiring! (Remote f irst, of f ices in Boston a re a )
  3. Context setting • I’m not a full-time voice coder anymore

    • I’m not an expert in this software • I am very privileged as far as voice coders go • Speak relatively unaccented “middle American” (white) US English • I don’t have the kind of medical issues that would require me to use voice recognition full time
  4. August 2020 C a mping in centr a l W

    a shington Photo: Sun L a kes/Dry F a lls St a te P a rk, Coulee City, WA
  5. Started to feel some pain in my right index fi

    nger while driving …ignored it
  6. What is Talon? • A customizable system for desktop voice

    recognition • Can use di ff erent voice recognition engines • But ships its own voice recognition model called Conformer • Built for programmers • All behaviors are user-de fi ned in either TalonScript or Python • Good community repositories of scripts • Patreon-funded • Talon core is a team of one person: Ryan Hileman
  7. Formatters • “Snake say some words” -> say_some_words • “Kebab

    say some words” -> say-some-words • “Hammer say some words” -> SaySomeWords • “Camel say some words” -> saySomeWords • “Sentence say some words” -> Say some words • “All caps say some words” -> SAY SOME WORDS • “Nope, that was camel” -> delete the last thing I said and reformat it as camel case
  8. Editing commands • Go left, go right, go word left,

    go word right • Clear line, select line, cut line, copy line • Lend, bend (line end, line begin) • Slap (insert new line below this one) • Language speci fi c commands • JavaScript: “Block” = insert {, empty line, }, place cursor in empty line • Ruby: “Instance loaded records” = insert “@loaded_records”
  9. Alphabet Air Bat Cap Drum Each Fine Gust Harp sIt

    Jury Krunch Look Made Near Odd Pit Quench Red Sun Trap Urge Vest Whale pleX Yank Zip
  10. Demo: copy some Ruby code rescue_from Pundit : : NotAuthorizedError

    do |error| Rails.logger.warn(error.message) if user_signed_in? redirect_to root_url, alert: error.message else session[:user_return_to] = request.url redirect_to root_url(show_authentication: 'signIn') end end
  11. Tips for trying out Talon • Don't try to do

    everything with Talon at fi rst • If you’re not getting good results, try using a better microphone • Add custom vocabulary • Join the community Slack Without getting too frustr a ted
  12. Accessibility • It’s not just for end users • “Accessibility

    is for everyone, including you if you live long enough” 
 - John Siracusa, Accidental Tech Podcast episode 415 • It’s not just about screen readers • Code formatters can be an accessibility tool • 🔥 take: please don’t abbreviate variable names
  13. How did I get th a t trigger f inger,

    a nyhow? Listen to your body
  14. How did I get th a t trigger f inger,

    a nyhow? Listen to your body
  15. How did I get th a t trigger f inger,

    a nyhow? Listen to your body I hope his fi nger is OK
  16. Resources Talon web site: https://talonvoice.com De facto standard Talon scripts:

    https://github.com/knausj85/knausj_talon Perl Out Loud by Emily Shea: https://youtu.be/Mz3JeYfBTcY Talon demos by Tara Roys: https://www.youtube.com/user/tararoys/videos