×

Discussion Board

Results 1 to 12 of 12
  1. #1
    Registered User
    Join Date
    Nov 2009
    Posts
    19

    Audio capture for 5 sec

    Hi All,
    I dont know much about the midlets.. I need to capture the sound( audio through mic) for 5 sec and need to convert in to binary and have to store the converted binary data in some file.. How to start this using midlets..? Is there any sample midlet which helps to implement this..?
    pls help to do this

    thanks and regards
    chethan

  2. #2
    Regular Contributor
    Join Date
    Oct 2007
    Location
    Pune
    Posts
    189

    Re: Audio capture for 5 sec

    Hello,

    Here is a link for how to record a audio.

    http://wiki.forum.nokia.com/index.ph...ce_using_MMAPI


    Here is a code for audio capture for 5 sec

    try {
    // Create a Player that captures live audio.
    Player p = Manager.createPlayer("capture://audio");
    p.realize();
    // Get the RecordControl, set the record stream,
    // start the Player and record for 5 seconds.
    RecordControl rc = (RecordControl)p.getControl("RecordControl");
    ByteArrayOutputStream output = new ByteArrayOutputStream();
    rc.setRecordStream(output);
    rc.startRecord();
    p.start();
    Thread.currentThread().sleep(5000);
    rc.commit();
    p.close();
    } catch (IOException ioe) {
    } catch (MediaException me) {
    } catch (InterruptedException ie) { }


    Hope this helps you
    Regards,
    Dinanath


    It's a matter of attitude.

  3. #3
    Regular Contributor
    Join Date
    Dec 2007
    Posts
    159

    Re: Audio capture for 5 sec


  4. #4
    Registered User
    Join Date
    Nov 2009
    Posts
    19

    Re: Audio capture for 5 sec

    Hi, I downloaded the record.jad given in the link "http://www.hcilab.org/documents/tutorials/AudioTest/ "to my phone.
    It records well but while playing it gives the follwing error "javax.microedition media.MedisException:Symbian OS error:-1"

    I dont have any idea about the OS error..pls help me to solve this..

    thanks
    chethan

  5. #5
    Regular Contributor
    Join Date
    Oct 2007
    Location
    Pune
    Posts
    189

    Re: Audio capture for 5 sec

    Hello,

    javax.microedition media.MedisException:Symbian OS error:-1 means

    "Unable to find the specified object”

    I also tried to run the midlet I got different error

    Prefetch -5.
    Regards,
    Dinanath


    It's a matter of attitude.

  6. #6
    Regular Contributor
    Join Date
    Nov 2009
    Posts
    53

    Re: Audio capture for 5 sec

    Chetan, check in which sound format you recorded and verify whether that format supported.

  7. #7
    Registered User
    Join Date
    Nov 2009
    Posts
    19

    Re: Audio capture for 5 sec

    Hi,
    I just need to record the PCM audio for 5 second and write in to the file(using midlets)..
    can you suggest any simple code for this..

    thanks..

  8. #8
    Registered User
    Join Date
    Nov 2009
    Posts
    19

    Re: Audio capture for 5 sec

    Hi All,
    I am able record the audio for 5 sec in amr format..
    I need to save the recorded audio in .wav/.mp3 format..
    pls help me to do the same..
    thanks
    chethan

  9. #9
    Registered User
    Join Date
    Nov 2009
    Posts
    19

    Re: Audio capture for 5 sec

    Hi,
    When I run the the midlet provided on the link "http://www.hcilab.org/documents/tutorials/AudioTest/ "on mobile phone it runs well,But the problem is ,when I run this, it asks "Allow application voiceRecord midlet suite to use audio application"? then i need to select YES and proceed .But I dont need this to come, when i run the application it should directly go to the application and start recording..What are the settings to be changed in order to skip the above step..?:

    pls help me to solve this..

    thanks
    chethan

  10. #10
    Regular Contributor
    Join Date
    Dec 2007
    Posts
    159

    Re: Audio capture for 5 sec

    when you run application it asks "Allow application voiceRecord midlet suite to use audio application"? because of security reason so for this you sign your application.

  11. #11
    Registered User
    Join Date
    Nov 2009
    Posts
    19

    Re: Audio capture for 5 sec

    Hi,
    I'm not much aware of the this midlets ,signinig and all..
    Can you pls tell me how to do the same..

    thanks a lot
    chethan

  12. #12
    Regular Contributor
    Join Date
    Nov 2009
    Posts
    53

    Re: Audio capture for 5 sec

    Many articles available in wiki regarding application signing, see the following URLs
    http://wiki.forum.nokia.com/index.php/Signing
    http://wiki.forum.nokia.com/index.ph...ning_-_Java_ME

Similar Threads

  1. Audio Capture, last 3 seconds of audio chopped off
    By aztec30 in forum Mobile Java Media (Graphics & Sounds)
    Replies: 6
    Last Post: 2006-09-15, 18:28
  2. Audio Capture
    By aztec30 in forum Mobile Java General
    Replies: 1
    Last Post: 2006-09-15, 02:16
  3. capture audio on S40 6101
    By lreyero in forum Mobile Java Media (Graphics & Sounds)
    Replies: 2
    Last Post: 2006-04-04, 18:09
  4. nokia 6600 audio capture problems
    By yuxl-bupt in forum Mobile Java Media (Graphics & Sounds)
    Replies: 6
    Last Post: 2005-12-21, 19:58
  5. Audio Capture in Java
    By larrydb in forum Mobile Java Media (Graphics & Sounds)
    Replies: 4
    Last Post: 2003-08-25, 15:13

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×