I found that the hardest part for voice recognition is not implementing it in your program. At least for me and my own speech patterns, most systems go as far as "i recognize that this is a voice you are using" before giving up and selecting some random action in the vague hope that this is what i asked for.

The best solution so far (at least for me) is using one of those Echo dot thingies and creating a module/app/whateveritsname on their site that RPCs my own home automation system. Google also has good voice recognition.

The problem ATM is that any locally installed version will almost always be inferior to what Amazon and Google can do, simply by throwing Petabytes of training data into their data centers to train some neural network. And then run that neural network on their custom-made neural network processor hardware.

If you don't mind Google listening in, you can try their speech-to-text models for free if i'm not mistaken. After that, it costs 2-3 cents per minute. The sad thing about this is, with current energy prices, it's probably more expensive to run an (inferior) speech recognition locally. There are client libs for a few different programming languages, shouldn't be impossible to re-implement one of those in Perl (or just control an external program)

There is also the possibility to use your browsers speech recognition (also uses the Google cloud in most cases) and sending the recocognized text to the perl webserver of your choice. BTW, browsers also have a build-in text-to-speech API.

Putting it in a website could make your application a bit more flexible, since you probably have a matching client in your pocket (=smartphone), so you can control your stuff by speech from everywhere. Basically, you outsource all the speech stuff to your browser, and do all the cool and interesting stuff in your perl backend.

PerlMonks XP is useless? Not anymore: XPD - Do more with your PerlMonks XP

In reply to Re: text2speech and speech recognition for perl in 2023 by cavac
in thread text2speech and speech recognition for perl in 2023 by Discipulus

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.