Editing Recording phonecalls
Warning: You are not logged in.
Your IP address will be recorded in this page's edit history.
The edit can be undone.
Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Latest revision | Your text | ||
Line 1: | Line 1: | ||
- | + | This page describes a method for recording calls from an N900, using pulseaudio command line tools to stream audio from input & output devices, which requires command line tinkering. | |
- | + | ||
- | This page describes a method for recording calls from an | + | |
This method was inspired by [http://www.outflux.net/blog/archives/2009/04/19/recording-from-pulseaudio/ a blog entry detailing how to record from pulseaudio], and [http://talk.maemo.org/showpost.php?p=441501&postcount=41 documented] by [http://talk.maemo.org/member.php?u=13228 iKneaDough on Talk.maemo.org]. | This method was inspired by [http://www.outflux.net/blog/archives/2009/04/19/recording-from-pulseaudio/ a blog entry detailing how to record from pulseaudio], and [http://talk.maemo.org/showpost.php?p=441501&postcount=41 documented] by [http://talk.maemo.org/member.php?u=13228 iKneaDough on Talk.maemo.org]. | ||
Line 11: | Line 9: | ||
apt-get install pulseaudio-utils | apt-get install pulseaudio-utils | ||
- | You can enable the tools repository by following | + | You can enable the tools repository by following [Documentation/devtools/maemo5#Installation | the instructions for installing devtools]. |
- | The pulseaudio-utils package provides two applications which can be used to record audio in scripts: | + | The pulseaudio-utils package provides two applications which can be used to record audio in scripts: '''parec''' to record raw audio streams, and '''pacat''' to play back raw audio streams. |
- | The streams involved are: | + | The streams involved are: '''sink.hw0.monitor''' for incoming sounds and '''source.hw0''' for outgoing sounds when using the phone handset, and '''sink.hw1.monitor''' for incoming sounds and '''source.hw1''' for outgoing sounds when using a bluetooth headset. |
== Creating scripts == | == Creating scripts == | ||
Line 21: | Line 19: | ||
Create the following shell scripts in your home directory: | Create the following shell scripts in your home directory: | ||
- | + | # Put the following in a script called '''simpleRec.sh''', which you can run to record a call using the handset: | |
- | + | ||
- | Put the following in a script called | + | |
- | + | NOW=`date +%F-%H-%M-%S` | |
- | NOW=`date +%F-%H-%M-%S` | + | echo $NOW > simpleDateTime |
- | echo $NOW > simpleDateTime | + | parec -d "sink.hw0.monitor" > MyDocs/tmp/$NOW.pulse.in.raw & |
- | parec -d "sink.hw0.monitor" > MyDocs/tmp/$NOW.pulse.in.raw & | + | parec -d "source.hw0" > MyDocs/tmp/$NOW.pulse.out.raw |
- | parec -d "source.hw0" > MyDocs/tmp/$NOW.pulse.out.raw | + | |
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | # Put the following in a script called '''simpleRec.sh''', which you can run to record a call using a Bluetooth headset: | |
- | NOW=`date +%F-%H-%M-%S` | + | |
- | echo $NOW > simpleDateTime | + | NOW=`date +%F-%H-%M-%S` |
- | parec -d "sink.hw1.monitor" > MyDocs/tmp/$NOW.pulse.in.raw & | + | echo $NOW > simpleDateTime |
- | parec -d "source.hw1" > MyDocs/tmp/$NOW.pulse.out.raw | + | parec -d "sink.hw1.monitor" > MyDocs/tmp/$NOW.pulse.in.raw & |
- | + | parec -d "source.hw1" > MyDocs/tmp/$NOW.pulse.out.raw | |
These scrips will create two files, one for the input stream and one for the output stream, in the directory MyDocs/tmp, with a name which contains the month, day, hour and minute of the phone call. | These scrips will create two files, one for the input stream and one for the output stream, in the directory MyDocs/tmp, with a name which contains the month, day, hour and minute of the phone call. | ||
- | For example, a phone call on the 13th of November, at 09:15, will be stored in the two files | + | For example, a phone call on the 13th of November, at 09:15, will be stored in the two files '''11-13-09-15.pulse.in.raw''' and '''11-13-09-15.pulse.out.raw''' |
- | + | ||
- | + | ||
== Playing back phonecalls == | == Playing back phonecalls == | ||
- | + | # To play back the most recent recorded call, use the following script (call it '''simpleLastPlay.sh''') : | |
- | + | ||
- | To play back the most recent recorded call, use the following script (call it | + | |
- | + | LAST=`cat simpleDateTime` | |
- | LAST=`cat simpleDateTime` | + | pacat MyDocs/tmp/$LAST.pulse.in.raw & |
- | pacat MyDocs/tmp/$LAST.pulse.in.raw & | + | pacat -v MyDocs/tmp/$LAST.pulse.out.raw |
- | pacat -v MyDocs/tmp/$LAST.pulse.out.raw | + | |
- | + | # To play back an older call using a unique date or time, use the following script (call it '''simplePlay.sh''') : | |
- | + | ||
- | + | ||
- | To play back an older call using a unique date or time, use the following script (call it | + | |
- | |||
pacat MyDocs/tmp/*$1*pulse.in.raw & | pacat MyDocs/tmp/*$1*pulse.in.raw & | ||
pacat -v MyDocs/tmp/*$1*pulse.out.raw | pacat -v MyDocs/tmp/*$1*pulse.out.raw | ||
- | |||
- | for example if you know you recorded a call on Dec 1 at 12:00 am, you could run | + | for example if you know you recorded a call on Dec 1 at 12:00 am, you could run ' ./simplePlay.sh 12-01-00-00 ' or any part of the date or time that you can remember, as long as it is unique. |
- | + | ||
- | ./simplePlay.sh 12-01-00-00 | + | |
- | + | ||
- | or any part of the date or time that you can remember, as long as it is unique. | + | |
- | + | ||
- | + | ||
To stop recording or playback just press ctrl+c. | To stop recording or playback just press ctrl+c. | ||
- | Here is another useful script to stop any recording or playback if you | + | Here is another useful script to stop any recording or playback if you can't get back to its original terminal window, called 'simpleStop.sh' : |
- | + | killall parec | |
- | killall parec | + | killall pacat |
- | killall pacat | + | |
- | + | ||
== Disclaimer == | == Disclaimer == | ||
Please use this only where it is legal to do so, and please do not use it for any nefarious purpose. | Please use this only where it is legal to do so, and please do not use it for any nefarious purpose. | ||
+ | |||
[[Category:Power users]] | [[Category:Power users]] | ||
- | [[Category: | + | [[Category:Multimedia]] |
[[Category:HowTo]] | [[Category:HowTo]] | ||
[[Category:N900]] | [[Category:N900]] |
Learn more about Contributing to the wiki.