Comments

Nested
Re: No sound
User: Sergey
Date: 5/2/2008 9:25 am
Views: 1665
Rating: 15

Hi Ken,

I disabled the onboard sound card and connected USB speakers and USB microphone.

The applet works perfectly.

I have recorded 2 files with a cheap Logitech USB mic.

When I try to use the studio mic "Snowball" I see the same problem in the applet as I see in Audacity: the recorded audio is twice slower and lower in pitch than my voice.

To fix this, Audacity lets you adjust the sampling rate.

I am not the only one who have this problem with Snowball in Linux:

http://ubuntuforums.org/showthread.php?t=736088

http://ubuntuforums.org/showthread.php?t=736852

That is sad, because Snowball's sound quality is much better than of any consumer microphones.

I guess Linux will have to fix the bug of incorrect sampling rate detection.

Or we may try to add a manual sampling rate adjustment into the applet like Audacity does.

Or, probably the easiest, record it in Audacity.

I can narrate a book into Audacity and then split it with the Automated Segmentation.

Does the Automated Segmentation works with Russian?

 

Re: No sound
User: kmaclean
Date: 5/2/2008 11:48 am
Views: 469
Rating: 12

Hi Sergey,

>I have added the line

>javax.sound.sampled.TargetDataLine=#AudioPCI [plughw:1,0]

>to /etc/java-6-sun/sound.properties but seems to have no effect.

Thanks for trying  :)

 

A bit more information in case you decide to look into this again:

From this post

Note: With JDK 1.5, it is possible to use a sound.properties file in the JRE\lib directory of your JDK installation. This sound.properties file can be used to specify the default Mixer that will be used when AudioSystem.getLine() is called for the various type of Line. In my case, the sound.properties file contains:

javax.sound.sampled.Port=#Port SB Audigy Audio [C400]
javax.sound.sampled.Sourc#SB Audigy Audio [C400]
javax.sound.sampled.TargetDataLine=#SB Audigy Audio [C400]

The mixer name is placed after the # sign. These are actually the defaults for my machine, so this file is not strictly necessary.

Your entry of "#AudioPCI" might be referencing a PCI card (i.e. your PCI card's mixer) rather than your USB mic.  It might be that we just need to figure the proper syntax for the USB mic designation... though I am not sure how to do this.

Ken 

 

Re: No sound
User: kmaclean
Date: 5/2/2008 12:14 pm
Views: 488
Rating: 17

Hi Sergey,

>I disabled the onboard sound card and connected USB speakers and USB microphone.

>The applet works perfectly.

excellent!

>Or we may try to add a manual sampling rate adjustment into the applet like Audacity does.

I thought of doing this programatically (i.e. letting the system test the audio card until it finds a supported sampling rate), but I guess this is a use-case for letting users override it in a preferences tab.

>Does the Automated Segmentation works with Russian?

No, not yet.  You would need to train g2p models with Russian text, and create Russian acoustic models for HTK - sphinx-align might be your best bet here. 

David Gelbart's post here indicates that it might be possible to use an English Acoustic model for segmentation.

Ken 

Re: No sound
User: Sergey
Date: 5/3/2008 7:56 am
Views: 508
Rating: 12

Hi Ken,

 

> Your entry of "#AudioPCI" might be referencing a PCI card ...

I suspected something is wrong with the syntax but couldn't find what it should be.

I guess the only way to find it out is to study the JRE source code. I don't think it's worth it.

 

>You would need to train g2p models with Russian text,

> and create Russian acoustic models for HTK - sphinx-align might be your best bet here.

I will narrate an audio book in Russian, break it into sentences and then I will try to figure out how to use g2p and sphinx-align to create HTK acoustic model. BTW I have found some Russian audio, Sphinx Acoustic models, and dictionary http://www.voxforge.org/home/downloads so I will not have to start from scratch :-)

David Gelbart's post might be useful too, but the problem is - I don't understand it much.

Probably I would need to get some background information on speech recognition first.

I have bought a book Spoken Language Processing and started to read it. So far it looks good to me.

Is it the best book to start with? Or would you recommend some other book?

 

--Thanks,

Sergey

 

Re: No sound
User: kmaclean
Date: 5/4/2008 11:30 am
Views: 477
Rating: 15

Hi Sergey,

>I will narrate an audio book in Russian, break it into sentences and then I will try to figure

>out how to use g2p and sphinx-align to create HTK acoustic model.

I might be easier to just segment your book (manually or with a script), and read/record those segment files ... unless, of course, you were planning to submit your book to LibriVox too.

>David Gelbart's post might be useful too, but the problem is - I don't understand it much.

I don't know the details of it myself, not having tried it, but I think the gist is that you figure which phonemes in English match those in Russian, and essentially modify a Russian pronunciation dictionary to use English phonemes, and use this with an English Acoustic model.  

> I have bought a book Spoken Language Processing and started to read it. So far it looks good to me.

Here are some other titles and links to online couses that might be helpful too.  The best way to learn is to play with the code (Sphinx or HTK) and try things.  Since there is so much theory involved it is easy to get overwhelmed with the details (especially all the formulas ...).

Ken 

Re: No sound
User: Sergey
Date: 5/5/2008 9:00 am
Views: 464
Rating: 15

Hi Ken,

Thanks for the info.

I can start with that, and then, as I go, annoy you with more questions ;-)

Thanks a lot,

--Sergey

 

Re: No sound
User: Greg Howell
Date: 4/7/2010 5:58 am
Views: 413
Rating: 5

Hey guys - I was suffering with this too, just figured it out for JMStudio, the sun demo app that lets you record video/audio: the default audio is STEREO, whereas my USB mic only recorded in MONO.


Changing from stereo to mono suddenly made the USB mixer/mic selected for audio input instead of the soundcards "line-in".

 

hope that works for somebody else out there too,

Greg

Re: No sound
User: Greg Howell
Date: 4/7/2010 6:04 am
Views: 424
Rating: 6

Hey guys - I was suffering with this too, just figured it out for JMStudio, the sun demo app that lets you record video/audio: the default audio is STEREO, whereas my USB mic only recorded in MONO.


Changing from stereo to mono suddenly made the USB mixer/mic selected for audio input instead of the soundcards "line-in".

 

hope that works for somebody else out there too,

Greg

Re: No sound
User: Greg Howell
Date: 4/7/2010 6:09 am
Views: 2337
Rating: 8

p.s. stereo -> mono only worked when I modified sound.properties with this line, which was in the output of the code below it:

javax.sound.sampled.TargetDataLine=#U0x46d0x8d7 [plughw:1,0]

Sergey I noticed you used the same line the other fellow used, but probably your mic is called something else on your system.

import javax.sound.sampled.*;

public class HelloWorld {
  public static void main( String[] args ) {
    for ( Mixer.Info info : AudioSystem.getMixerInfo() ) {
      Mixer mixer = AudioSystem.getMixer(info);
      Line.Info lineInfo = new Line.Info(DataLine.class);

      System.out.println( "Mixer " + info.getName() +
              " desc: " + info.getDescription() +
              " vend: " + info.getVendor() +
              " ver: " + info.getVersion()    );

      if ( mixer.isLineSupported( lineInfo ) ) {
    for ( Line.Info linfo : mixer.getTargetLineInfo(lineInfo) ) {
      for ( AudioFormat form : ((DataLine.Info) linfo).getFormats() )
        System.out.println( "  " + form );
    }
      }
    }
  }
}

 

good luck,

Greg

Re: No sound
User: kmaclean
Date: 4/7/2010 7:35 am
Views: 474
Rating: 8

Hi Greg,

thanks for your help on this!

Ken

PreviousNext