Recording phonecalls: Difference between revisions
imported>dneary Copy article about recording phone calls to Wiki. Thanks |
imported>amigadave wikify slightly |
||
| (7 intermediate revisions by 4 users not shown) | |||
| Line 1: | Line 1: | ||
'''A desktop widget to record phone calls is now available from Maemo Extras. Search for [http://maemo.org/downloads/product/Maemo5/recaller/ "recaller"] using your Application Manager.''' | |||
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 [[Nokia N900|N900]], using pulseaudio command line tools to stream audio from input & output devices, which requires command line tinkering. | ||
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 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]. | ||
== Install pulseaudio-utils == | == Install pulseaudio-utils == | ||
| Line 10: | Line 11: | ||
apt-get install pulseaudio-utils | apt-get install pulseaudio-utils | ||
You can enable the tools repository by following [Documentation/devtools/maemo5#Installation | the instructions for installing devtools]. | 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: <code>parec</code> to record raw audio streams, and <code>pacat</code> to play back raw audio streams. | ||
The streams involved are: | The streams involved are: <code>sink.hw0.monitor</code> for incoming sounds and <code>source.hw0</code> for outgoing sounds when using the phone handset, and <code>sink.hw1.monitor</code> for incoming sounds and <code>source.hw1</code> for outgoing sounds when using a bluetooth headset. | ||
== Creating scripts == | == Creating scripts == | ||
| Line 20: | Line 21: | ||
Create the following shell scripts in your home directory: | Create the following shell scripts in your home directory: | ||
<ol> | |||
<li> | |||
Put the following in a script called <code>simpleRec.sh</code>, which you can run to record a call using the handset: | |||
<source lang="bash"> | |||
NOW=`date +%F-%H-%M-%S` | |||
echo $NOW > simpleDateTime | |||
parec -d "sink.hw0.monitor" > MyDocs/tmp/$NOW.pulse.in.raw & | |||
parec -d "source.hw0" > MyDocs/tmp/$NOW.pulse.out.raw | |||
</source> | |||
</li> | |||
<li> | |||
Put the following in a script called <code>simpleRec.sh</code>, which you can run to record a call using a Bluetooth headset: | |||
<source lang="bash"> | |||
NOW=`date +%F-%H-%M-%S` | |||
echo $NOW > simpleDateTime | |||
parec -d "sink.hw1.monitor" > MyDocs/tmp/$NOW.pulse.in.raw & | |||
parec -d "source.hw1" > MyDocs/tmp/$NOW.pulse.out.raw | |||
</source> | |||
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 <code>11-13-09-15.pulse.in.raw</code> and <code>11-13-09-15.pulse.out.raw</code> | ||
</li> | |||
</ol> | |||
== Playing back phonecalls == | == Playing back phonecalls == | ||
<ol> | |||
<li> | |||
To play back the most recent recorded call, use the following script (call it <code>simpleLastPlay.sh</code>): | |||
<source lang="bash"> | |||
LAST=`cat simpleDateTime` | |||
pacat MyDocs/tmp/$LAST.pulse.in.raw & | |||
pacat -v MyDocs/tmp/$LAST.pulse.out.raw | |||
</source> | |||
</li> | |||
<li> | |||
To play back an older call using a unique date or time, use the following script (call it <code>simplePlay.sh</code>): | |||
<source lang="bash"> | |||
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 | ||
</source> | |||
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: | ||
<pre> | |||
./simplePlay.sh 12-01-00-00 | |||
</pre> | |||
or any part of the date or time that you can remember, as long as it is unique. | |||
</li> | |||
</ol> | |||
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 cannot get back to its original terminal window, called <code>simpleStop.sh</code>: | ||
<source lang="bash"> | |||
killall parec | |||
killall pacat | |||
</source> | |||
== 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:Media]] | ||
[[Category: | [[Category:HowTo]] | ||
[[Category:N900]] | |||
Latest revision as of 12:05, 4 October 2010
A desktop widget to record phone calls is now available from Maemo Extras. Search for "recaller" using your Application Manager.
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 method was inspired by a blog entry detailing how to record from pulseaudio, and documented by iKneaDough on Talk.maemo.org.
Install pulseaudio-utils
First you will need to get the pulseaudio-utils package. You can install this either from the online Fremantle repository, or by enabling the tools repository and running
apt-get install pulseaudio-utils
You can enable the tools repository by following the instructions for installing devtools.
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: 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
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: <source lang="bash"> NOW=`date +%F-%H-%M-%S` echo $NOW > simpleDateTime parec -d "sink.hw0.monitor" > MyDocs/tmp/$NOW.pulse.in.raw & parec -d "source.hw0" > MyDocs/tmp/$NOW.pulse.out.raw </source> -
Put the following in a script called
simpleRec.sh, which you can run to record a call using a Bluetooth headset: <source lang="bash"> NOW=`date +%F-%H-%M-%S` echo $NOW > simpleDateTime parec -d "sink.hw1.monitor" > MyDocs/tmp/$NOW.pulse.in.raw & parec -d "source.hw1" > MyDocs/tmp/$NOW.pulse.out.raw </source> 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 files11-13-09-15.pulse.in.rawand11-13-09-15.pulse.out.raw
Playing back phonecalls
-
To play back the most recent recorded call, use the following script (call it
simpleLastPlay.sh): <source lang="bash"> LAST=`cat simpleDateTime` pacat MyDocs/tmp/$LAST.pulse.in.raw & pacat -v MyDocs/tmp/$LAST.pulse.out.raw </source> -
To play back an older call using a unique date or time, use the following script (call it
simplePlay.sh): <source lang="bash"> pacat MyDocs/tmp/*$1*pulse.in.raw & pacat -v MyDocs/tmp/*$1*pulse.out.raw </source> 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.
To stop recording or playback just press ctrl+c.
Here is another useful script to stop any recording or playback if you cannot get back to its original terminal window, called simpleStop.sh:
<source lang="bash"> killall parec killall pacat </source>
Disclaimer
Please use this only where it is legal to do so, and please do not use it for any nefarious purpose.