0
$\begingroup$

Recently, I am building an application in Octave and I saw some algorithms about speech recognition spread around the net, but most of them were implemented in Python, MATLAB, C++ and no one in Octave. I already came to test the MATLAB one in the Octave IDE but there are lots of packages that exists in MATLAB and there aren't in Octave, I have tried already to look for at the net in order to find anyway to run extensions to run Python functions in Octave for example but I've only found simple ones to return list of numbers, these things...

Is there any possibility to implement a speech recognition integrated with google voice that converts speechs in text in GNU Octave?

$\endgroup$
  • 1
    $\begingroup$ That just sounds like you'd call a command line tool from octave, which works. But honestly... if you use Python extensions, go directly for Python. I've lost all reasons to use Octave in the last couple of years; there's nothing left that Octave is good at and Python can't do well. And overall, Python is much, much more powerful, especially when it comes to signal processing. $\endgroup$ – Marcus Müller Jul 19 at 19:56
  • $\begingroup$ Thank you for your answer, so, I would like to work with Python that I use also but the problem is because I am working in a neuroscience stimulus project with Psychtoolbox which was developed in Octave and I have finished learn Octave without unlearn Python, and now I have tried to migrate all the Octave source code to Python but there are some errors going on that I'm trying to fix $\endgroup$ – Victor Jul 19 at 20:05
  • $\begingroup$ hm. Tough choice; personally, juggling muiltiple programming languages gets easier over time. But I can imagine you're not keen on doing that. But this clearly is something that's way easier in Python. I'd rather try to call Octave stuff occasionally from Python, than the other way around. $\endgroup$ – Marcus Müller Jul 19 at 20:19
  • $\begingroup$ Can I please ask if this was resolved? $\endgroup$ – A_A yesterday
2
$\begingroup$

Is there any possibility to implement a speech recognition integrated with google voice that converts speechs in text in GNU Octave?

Yes.

The Google Cloud command line utility returns results in JSON. Octave is working on its JSON support, but until then you can use something like this.

What we are missing now is triggering the whole process from within Octave.

This can be achieved with the Subprocess control functions.

Usually, you can redirect the stdin, stdout streams towards buffers in your application, which would get you the JSON in a local variable within Octave from which then you can call its parser to make it computable. If you cannot, you would have to create an intermediate file and read any data through that. Which might require some timing control too.

This is the general way of going about it even across languages (e.g. Python) and exchanging JSON is probably the better option than just returning some data over a stream and relying on putting it back together on the other side.

But this is also slow which your users (subjects) might find annoying. There is the overhead of starting up the process and in this case, there will be data exchanged over the network too. Besides, the free version of this google service allows a limited number of accesses per month. So, overall, it might be better to check if you can handle that recognition bit locally. You would still probably have to call an external to Octave package (...indeed, most probably Python with the same way outlined here), but the round-trip will be quicker (and cheaper).

Hope this helps.

| improve this answer | |
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.