Speech recognition and segmentation. Recognize is a speech to text based on Sphinx4. It translates the incoming audio signal into text and can give dates of words and phonemes in a buffer~. Uses JSGF grammar file and ngram model languages. No special voice learning is needed and potentially multilingual.

More Links

Jan 09 2010 | 12:06 am

Jan 25 2010 | 11:02 pm

o nice! thank you so much for working on this project! i was going to try to implement an earlier speech to text program i had found (but never tested) in a performance piece coming in april. I’ll get into this in march, and i’ll definitely link you the results.
thank you so much!

Olivier Pasquet
Feb 02 2010 | 12:58 pm

There were too many dl from my website. You can now download it from :

Feb 14 2010 | 6:09 am

Feb 27 2010 | 9:28 am

Hi pasquet!
Thanks for your implements.

I’ve installed op.recognize and when i try to load a text file, the message "op.recognize-> error allocating" shows up in the Max window. What’s going on?

I couldn’t solve this problem, maybe you know what is wrong ;-(


Mar 02 2010 | 9:22 am

Hello !

I wrote this error message when you have a mistake in the loading of data.
It seems you are using the right extension files.

Make sure you have installed "sphinx4max.jar" AND "jsapi.jar" in your Max java/lib folder.
If yes, what did you write in the gram textfile you loaded ? You should have a look indide the digits.gram example. Maybe the problem is there.
Another question : are you using the example file or did you make a new one ?


Mar 04 2010 | 6:23 am

New version with bug fixes and more efficiency :

Mar 08 2011 | 9:03 am

Hi Olivier,
Wonderful and very useful implementation!
I’m experiencing the same problem as Gilson. Getting "op.recognize-> error allocating" message when I try to load the example .gram and .lm files. This happens on a Windows system. I also tested on Mac and everything seems to work fine there. Any ideas?


Mar 24 2011 | 4:05 am


Oohoh really ?
I’ll quickly have a look if there is a problem on Windows.

Are you sure you did put the jar file into the lib folder and if you accepted the SUN conditions running the shell script ?
You can find the installation information in the read_me.txt file.

Apr 05 2011 | 6:33 am

I am having trouble unpacking it? I have windows so this terminal.app thing doesnt apply, I’ve moved the files to the classes and lib folder in the java folder….

Now what dooo I do? :(
Kindest Regards,


Apr 09 2011 | 5:22 am

I’ve got a little further, what is this error?

(mxj~) Class op.recognize is not a subclass of com/cycling74/msp/MSPObject

Apr 13 2011 | 5:17 pm

There is an error in the max window saying "wrong arguments"… ?

Apr 14 2011 | 8:17 am

Hello Rob,

You are using mxj~ and not mxj. I guess it is the reason.


Apr 14 2011 | 8:19 am

Hello batman,

You probably do not use the right arguments. Do you have this problem when you load the help patch ?


Apr 14 2011 | 2:24 pm

Thank you for your reply, I am attempting to make an installment for a university project! It says that there is no helpfile for op.recognize when I press "alt" and click the mxj op.recognize object. In-fact, when I type "mxj op.recognize", in the max window it says straight away "wrong arguments" before I have even done anything!


Apr 15 2011 | 9:12 am

Hey Olivier!

First of all, you did a great job on that object. It works very well.

Is it possible to make the speech recognition in real time? I need it to sync a text written behind an actor with the actors voice.

Also, I am german. Do you know where I can find a german dictionary to feed your object with?

kind regards,

Jun 15 2011 | 11:02 am

Hi Olivier,

This is indeed a great work, and a big resource.
I have installed and am not able to make it work.

How do I give a voice input ?
I am a novice, just started my research on speech recognition.

It’ll be really helpful if you can tell me how exactly this works.


Jun 20 2011 | 6:59 am

> Is it possible to make the speech recognition in real time? I need it to sync a text written behind an actor with the actors voice.
< yes and no. :)
Since it is not a continuous audio stream, you have to find a way to stop the recording, then do the process. I did used 2 buffers in parallel. The most difficult part of the job is finding the right moment when to stop the recording. Envelope follower ?

Jun 20 2011 | 7:01 am

> How do I give a voice input ?
< You have to use buffer~ and record~. record~ would record the audio to the buffer~. When you have finished recording, you stop the recording and bang the object.
I hope this helps.

Jun 20 2011 | 7:04 am

> In-fact, when I type "mxj op.recognize", in the max window it says straight away "wrong arguments" before I have even done anything!
< You need to give it at least one argument; the buffer name to which it is related.

Aug 25 2013 | 5:45 pm

I’m getting op.recognize-> error allocating when trying to load any of the example language files. I am on windows. Copied the right files to the classes and lib dirs. Anyone figure this out yet?

This looks good right?
C:Program Files (x86)Cycling ’74Max 6.1Cycling ’74javalibjitter.jar
C:Program Files (x86)Cycling ’74Max 6.1Cycling ’74javalibjode-1.1.2-pre-embedded.jar
C:Program Files (x86)Cycling ’74Max 6.1Cycling ’74javalibjsapi.jar
C:Program Files (x86)Cycling ’74Max 6.1Cycling ’74javalibmax.jar
C:Program Files (x86)Cycling ’74Max 6.1Cycling ’74javalibsphinx4max.jar
C:Program Files (x86)Cycling ’74Max 6.1Cycling ’74javaclasses
Jitter initialized
Jitter Java support installed
op.recognize based on CMU SphinX4 _Olivier Pasquet _2006 – rev 2009

Dec 13 2013 | 8:19 am

does look good, i’m on osx 10.6.8 and have comparable things, i succeed loading digits.gram, alas not hellongram.trigram.lm
errors reported :
class not found !java.lang.ClassNotFoundException: edu.cmu.sphinx.model.acoustic.WSJ_8gau_13dCep_16k_40mel_130Hz_6800Hz.Model
op.recognize-> error allocating Property exception component:'lexTreeLinguist' property:'acousticModel' - component 'hub44' is missing
edu.cmu.sphinx.util.props.InternalConfigurationException: component 'hub44' is missing

Dec 27 2013 | 2:38 pm

is the source code available anywhere? I may end up following in Oliver’s footsteps and wrap Sphynx for max, but if the work has already been done, it would be nice to just debug what’s there.

Dec 27 2013 | 6:43 pm

you should get in touch directly with him then :) (through his website)

Oct 30 2015 | 3:56 pm

Hi Vichug. I get the same problem as you – did you ever find a solution?

Oct 31 2015 | 12:38 am

Hey, sorry, it’s been some time… but i’m not sure i ever succeeded tbh… i think i was hoping for Metameta to succed in recompiling the sources…

Nov 02 2015 | 3:48 am

Thanks for letting me know. I’ll try on a different computer and mention if I have any luck.

Nov 13 2016 | 5:48 am


I am trying to install op.recognize into max 6.1 but having issue when it comes to go to the lib directory in the terminal.
I put the files into the folders as indicated in the readme.txt.
What should i do afterward? When i type the directory (/Applications/Max 6.1/Cycling ’74/java/lib) in the termnial i have a message saying " No such file or directory"…

Help please!!

Thanks in advance

Jan 12 2017 | 9:18 am

Been trying to get op.recognize to work on Max 7 under Windows. No success so far, but i figured i’d share my steps here, and maybe someone has any additional insight?

I don’t use Max/MSP regularly, apologies if something seems basic, it all feels equally daunting to me.

This is what i figured out so far:
– need same bits version of java and max installed
– need to place the library files under specific paths
C:\Users\username\Documents\Max 7\Packages\recognize\java-classes\lib\jsapi.jar
C:\Users\username\Documents\Max 7\Packages\recognize\java-classes\lib\sphinx4max.jar
C:\Users\username\Documents\Max 7\Packages\recognize\java-classes\op\recognize$1.class
C:\Users\username\Documents\Max 7\Packages\recognize\java-classes\op\recognize$2.class
C:\Users\username\Documents\Max 7\Packages\recognize\java-classes\op\recognize$3.class
C:\Users\username\Documents\Max 7\Packages\recognize\java-classes\op\recognize.class

If there is no "Packages\recognize\java-classes\op\" you get this error message:
Could not load class ‘op.recognize’

If the jar’s are not found when max launches you’ll get these kind of errors when running the patches using op.recognize:
op.recognize-> file not loaded or not enabled or not ready yet

If both are present on the paths noted above you get a much nicer:
op.recognize-> error allocating Property exception component:’jsgfGrammar’ property:’grammarLocation’ – Bad URL C:\Users\username\Downloads\recognize\recognize\simple-examplesunknown protocol: c
edu.cmu.sphinx.util.props.InternalConfigurationException: Bad URL C:\Users\username\Downloads\recognize\recognize\simple-examplesunknown protocol: c

Googling this up i’m still a bit unsure what the problem is exactly, might be some mac/windows different path naming issue?! not sure if i can fix it on max or would require some patch on the sourcecode.

The original sourcecode isn’t available so i decompiled the classes but i never did a max external before so i’m wondering how to actually set the project up (i guess there is a tutorial for this somewhere) and what the issue might be exactly (old max version objects used?! mac/windows path differences?!) so i’m just going to end up making random basic tests to try to figure it out.

Was hoping someone with more max externals knowledge would read this and give me some hint…

Viewing 29 posts - 1 through 29 (of 29 total)

Explore More

Subscribe to the Cycling ’74 Weekly Newsletter

Let us tell you about notable Max projects, obscure facts, and creative media artists of all kinds.

* indicates required