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:
'''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.'''
'''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 [[Nokia N900|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 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 [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 13: Line 13:
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: <code>parec</code> to record raw audio streams, and <code>pacat</code> to play back raw audio streams.
+
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: <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.
+
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 21:
Create the following shell scripts in your home directory:
Create the following shell scripts in your home directory:
-
<ol>
+
# Put the following in a script called '''simpleRec.sh''', which you can run to record a call using the handset:
-
<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`  
-
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
+
-
</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">
+
# 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 &
-
</source>
+
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 <code>11-13-09-15.pulse.in.raw</code> and  <code>11-13-09-15.pulse.out.raw</code>
+
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'''
-
</li>
+
-
</ol>
+
== Playing back phonecalls ==
== Playing back phonecalls ==
-
<ol>
+
# To play back the most recent recorded call, use the following script (call it '''simpleLastPlay.sh''') :
-
<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`
-
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
+
 
-
</source>
+
# To play back an older call using a unique date or time, use the following script (call it '''simplePlay.sh''') :
-
</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 ' ./simplePlay.sh 12-01-00-00 ' or any part of the date or time that you can remember, as long as it is unique.
-
<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 cannot get back to its original terminal window, called <code>simpleStop.sh</code>:
+
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' :
-
<source lang="bash">
+
killall parec
-
killall parec
+
killall pacat
-
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]]

Learn more about Contributing to the wiki.


Please note that all contributions to maemo.org wiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see maemo.org wiki:Copyrights for details). Do not submit copyrighted work without permission!


Cancel | Editing help (opens in new window)