Menu

Sphinx4 within MaxMSP

Help
pasquetje
2005-10-07
2012-09-22
  • pasquetje

    pasquetje - 2005-10-07

    Hello,

    I have started to implement Sphinx4 in Max/MSP ( http://www.cycling74.com ).


    • Max takes the sound input as in[i].

    I'm trying to get rid of the Microphone in Sphinx4 and use in[i] (with AudioData()?).

    QUESTION : How can I get rid of the stream from the system (microphone) and replace it by an audio stream (the one from Max) in the form of in[i]?

    Thank you!

     
    • pasquetje

      pasquetje - 2005-10-14

      hi!

      I'm still trying to have something like ( ins[0].vec is the vector from the live sound input ):

      method {
      int i;
      float[] in = ins[0].vec;

      for(i = 0; i < in.length;i++)
      { make the Sphinx4 audio stream input in here with in[i] }
      }

      thank you very much!

       
    • kiuzzi

      kiuzzi - 2005-10-10

      Hi

      Have a look at the Transcriber Demo Program shipped with Sphinx4.

      Good Luck

       
    • pasquetje

      pasquetje - 2005-10-10

      In the Transcriber demo, you have

      AudioInputStream ais = AudioSystem.getAudioInputStream(audioURL);

      With audioURL is a sound file.
      The max input is a stream of float values as a stream of data (realtime). I need something like:

      method {
      int i;
      float[] in = ins[0].vec;

      for(i = 0; i < in.length;i++)
      { make the Sphinx4 audio stream input in here with in[i] }
      }

      microphone.java does the job but it uses AudioInputStream and AudioSystem.
      I looked in StreamDAtaSource but...

      short[i] shortin = (short)in[i];

      StreamDataSource reader = (StreamDataSource) cm.lookup("streamDataSource");
      reader.setInputStream( new AudioInputStream(shortin), "streamName");

       
    • pasquetje

      pasquetje - 2005-10-10

      Actually, "make the Sphinx4 audio stream input in here with in[i]" is maybe wrong.

      I just need to feed the AudioInputStream from the samples coming from in[] (where 'in[]' has floats).
      The loop can be used to get input samples one by one inside a single dsp vector size.

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.