Page 1 of 4 1234 LastLast
Results 1 to 20 of 62
  1.    #1  
    Hi all,

    I just wanted to play a little with audio recording on the Pre (I know Precorder is currently being released, but I wanted to explore another way to go) and maybe found something (simple, requires ssh-ing to the Pre).

    The Pre is delivered with /usr/bin/parec, a basic recording tool from PulseAudio. Reading the FAQ (FAQ -- PulseAudio), a simple command-line enables recording into a wav file:
    Code:
    parec --format=s16le --rate=44100 --channels=1 | sox --type raw -s2L --rate 44100 --channels 1 - --type wav output.wav
    So "sox" is needed to wrap the input audio stream into a WAV header, but is not (pre-)installed. This is easily fixed, though:
    Code:
    ipkg-opt install sox
    Recording from the mic on a command-line is deadly simple: run the parec/sox command for as long as needed, of course speak in front of the mic, then hit Ctrl-C to end the recording. Now perform a little playback to hear your recording:
    Code:
    aplay output.wav
    OK, this is a very low-level job, but it shows that accessing the input mic on the Pre is not so complicated. Could this open the way to some open-source VoIP application? :-)

    For what it's worth, if not published before (I checked in the forum but found nothing except Precorder).
    Last edited by Thibaud; 02/17/2010 at 12:10 PM. Reason: Changed number of channels from 2 to 1, there is no stereo MIC so far...
    Palm Pilot Pro -> M505 -> T|X -> (franken) Pre & Pixi -> Pre2 2.2.4 & TP
    Linphone port to webOS (1.4.x -> ...), lately working on NAVIT
  2. #2  
    Okay, so Palm has got to realize that access to the mic is a really important function. If it's so easy, then why didn't Palm include it in the OS?

    I really want to be able to audio record, and voice dial as soon as possible.

    You go crazy Thibaud, if you can get audio recording and voice dial up and running I will PAY YOU MONEY!
  3. #3  
    Pleassseeeeeee we need it soooooo baddddd!!! I will donate good money
  4. #4  
    I remember seeing a thread that started delving into the topic of a native voip or sip client. They were having problems with the mic and sound system. It should be possible to combine the work of Prerecorder, the info that is listed here and the progress that was made earlier in this thread: http://forums.precentral.net/web-os-...v-do-wifi.html Hopefully combining these will make programming a voip or sip client quite easy. Everything seems to be there.
    Last edited by ms2474; 12/04/2009 at 12:13 PM.
  5. #5  
    This is good work here.

    But, this might worry some privacy advocates.

    I'm not claiming to understand the intricacies of pulse audio as a proxy, or even ALSA in general, but it would seem the microphone is.. well.. always "on" (at least any time alsa is accessed).

    When I get back to my testing box I'll edit this post with a link to a working audio pipeline built in gstreamer.

    It would seem just "grabbing from alsa" is enough to pick up from the mic. In theory it would only take a very small backdoor for someone to hear your local audio from anywhere.

    Tinfoil hat time.
    Bringing you the first video recorder (Precorder), the first SDL application/game (DOOM), the first "make my magicjack/corporate voicemail play on my webos phone thingy" (gsm codec package), and now, webos's first opensource media recorder (voice and stream!) -> zcorder
  6.    #6  
    Some little more about "parec" when used with no explicit input device (source, see OP):
    • If earphones have been plugged in, PulseAudio/WebOS will get the voice from the MIC part of the plug (the 4th segment that can be seen on the native PALM earphones) => also means no sound will be recorded if the earphones don't embed a MIC (verified)...
    • If no earphones have been plugged in, then the voice will be captured from the internal MIC next to the center "home" button (verified)
    • In case a bluetooth headset is connected, I suspect PulseAudio/Webos will source the voice from the bluetooth MIC in the headset, but I cannot test it yet...


    That's neat, WebOS apparently manages everything "consistently" and "transparently"!
    Palm Pilot Pro -> M505 -> T|X -> (franken) Pre & Pixi -> Pre2 2.2.4 & TP
    Linphone port to webOS (1.4.x -> ...), lately working on NAVIT
  7. rayhollister
    rayhollister's Avatar
    #7  
    So, have you been able to make it work yet Thibaud? One of the reasons I still carry my Centro is because I can record interviews on it. I would love to be able to do it on my Pre instead. Palm keeps dragging their knuckles on getting an API out.
  8. #8  
    dont give up
  9. #9  
    YES. Please don't give up.
    I used to have a samsung epix that ran on wm6.
    I am also a musician. Contrary to what you would expect I was actually able to get some pretty nice acoustic demos from an app called Audio Notes Touch... From a phone. It was really useful for jotting down quick ideas for songs when I wasn't able (or willing) to set up recording equipment on my comp. I would kill to have the same thing on my pre.
  10. tc600's Avatar
    Posts
    305 Posts
    Global Posts
    306 Global Posts
    #10  
    Taking off with Thibaud's initial discoveries, I created a recording script that's easy to run from Terminal or Terminus. It's quick and dirty, but it autonames according to the date and time and puts the file into the root of the media folder.

    I set it record at 8k and in mono to a WAV file, but that's easy enough to change. I haven't yet figured out what other audio formats are recordable as the options I tried with anything other than WAV generally created noise - usually loud NOISE!

    I put a how-to in the zip, but please try it out and verify that I didn't miss any steps ...
    Attached Files Attached Files
  11. #11  
    This works great!! Any way to have the mic pick up sounds better when far away. I was sitting in my chair and the pre was on the desk I could hear the recorded message but it was kind faint. Any chance of making this an app? You need a donate button I am ready to donate I it would be great if you could make a simple interface that pushes the command and another button to end with the sym c. Great Job!!!
  12. #12  
    I'd easily pay 10 bucks for that app. At least, especially if it would record as mp3 files at a decent bitrate. Developers please stumble upon this thread again.
  13. #13  
    I have developed an audio recording application that will be available with in the next few days (with any luck) in the webos-internals testing feed.

    It does not use this same method, but a similar one.

    parec is basically a simple pulse audio utility to record from a source (in this case i believe the pcm_input from alsa for the mic is Source #0)

    My application uses the pulsesrc plugin directly through a gstreamer pipeline, in C, so in theory it allows for more flexability in the future (variable controls for stream and bitrate, various plugins for mp3 etc), and even a voice activation mode.

    Not trying to rain on anyone's parade. I'll probably start a thead in the webos-internals forum when it's up.
    Bringing you the first video recorder (Precorder), the first SDL application/game (DOOM), the first "make my magicjack/corporate voicemail play on my webos phone thingy" (gsm codec package), and now, webos's first opensource media recorder (voice and stream!) -> zcorder
  14. tc600's Avatar
    Posts
    305 Posts
    Global Posts
    306 Global Posts
    #14  
    I look forward to trying out your recording app, Prenosicator! I'm no where close to an app. I was just hacking around and thought I'd share to see if it would help anyone else out.
  15. #15  
    As a small update, I managed to fix the majority of the bugs and it runs, for both microphone recording and internal stream recording (ie: it records what other apps are playing).

    I will get a testing build out once I can verify the gst plugins are staging properly on a new install, and will update this post with a link to the testing release/launch thread. Thanks for your patience!
    Bringing you the first video recorder (Precorder), the first SDL application/game (DOOM), the first "make my magicjack/corporate voicemail play on my webos phone thingy" (gsm codec package), and now, webos's first opensource media recorder (voice and stream!) -> zcorder
  16. #16  
    Quote Originally Posted by Prenosicator View Post
    As a small update, I managed to fix the majority of the bugs and it runs, for both microphone recording and internal stream recording (ie: it records what other apps are playing).

    I will get a testing build out once I can verify the gst plugins are staging properly on a new install, and will update this post with a link to the testing release/launch thread. Thanks for your patience!
    WOOT! WOOT! WOOOOT!!!

    It seems as if all of the major problems with webOS have been resolved within a couple weeks of each other -- UberKernel, Save/Restore, *REAL* Backup w/ PreImage, Voice Recording (and possibly Call Recorder, as well??), and it even seems as if Palm Management has finally realized how to run a successful business -- by asking for helping hands.

    WOOT!!!!!!!!

    So, prenosicator... From the sounds of it, I'm assuming that this will be able to function as a call recorder as well??
  17. #17  
    As of right now, no. The current two available sources are Microphone and pcm_output (which I described earlier as "what other apps are playing"). The mechanism for this is through pulse audio sources and sink monitors, for the most part.

    The next improvement in this area will be from bluetooth (ie: you can talk into your headset and it will record it).

    All of these take the assumption that you are /not/ on a phone call. The mechanism the Pre and Pixi use during phone calls is much lower level, and MUCH higher priority then everything else your phone, luna, or webOS in general is doing. This is why you can hit 'answer' and begin talking, even before the phone dialer app/card pops up.

    This doesn't mean it's /impossible/, it just means it requires a different method, and would be difficult. I do, however, have it on the trac, and planned for a future release.

    Since the new "Precorder" C service (or should I say plugin?) is a low level gstreamer application, building pipelines directly, there is much possibility. For instance, it could be used to transcode media, or cut/splice files, or just as a new opensource player. These sort of future implementations are being considered, and may be developed as separate applications. We also have to look into the possibility of doing full API conversion to PDK for app catalog release, once submission of those applications becomes possible.
    Bringing you the first video recorder (Precorder), the first SDL application/game (DOOM), the first "make my magicjack/corporate voicemail play on my webos phone thingy" (gsm codec package), and now, webos's first opensource media recorder (voice and stream!) -> zcorder
  18. #18  
    Quote Originally Posted by Prenosicator View Post
    I have developed an audio recording application that will be available with in the next few days (with any luck) in the webos-internals testing feed.
    ! !
    My device history:

    - Jim J.

    (On Sprint for many years)
  19. #19  
    Prenosicator, you are my freaking hero. Could you tell us more about the app, such as if there are any caps ib the length of recording, if you can save files in mp3 format, etc?
  20. #20  
    ok so what if you installed the script in this thread and the sox to make it work do we need to uninstall and if so what is the proocedure. Thanks
Page 1 of 4 1234 LastLast

Posting Permissions