Ubuntu 14.10, Audacity 2.0.5, PulseAudio.
I’ve been using Audacity to record audio output from my computer, using the PulseAudio instructions here: http://manual.audacityteam.org/o/man/tutorial_recording_computer_playback_on_linux.html
It used to work fine, but now, it records slightly slower than sound is played. It does this specifically when I’m recording streamed music. It records at the correct speed when my computer isn’t playing any audio.
Any idea why this might be happening? (If you need any more info, let me know.)
If the sound quality (other than the speed) is OK, then my guess is that it is due to mis-matched sample rates.
Does the difference in speed tally with a difference between 44100 Hz and 48000 Hz?
The first thing that I’d try is rebooting the computer, then test by recording something that has worked correctly previously.
I tried it again and it went too fast and then crashed. A few reboots later and it was agin too slow. I changed the Project Rate to 48000 before recording and it still was too slow. The original time was 211 seconds and the recording time was 229 sec, which does match up in the difference between the two sample rates.
How do I change the sample rate so that it works? Why does it do this?
I am on Ubuntu 14.04 and have Audacity 2.0.5 and am having the same exact issue.
I have tried going between 44100, 48000, 32000, 22050 … none of them record audio from the computer correctly.
It is either very slow playback, or a bunch of static and the program crashes.
@Prime624 and ja.: You could try quitting Audacity then open ~/.audacity-data/audacity.cfg in your favourite text editor. Delete all the contents of audacity.cfg and replace the contents so there is only this line:
Note that .audacity-data is a hidden folder so you may need to configure graphical file managers to show hidden folders.
You may (possibly) find that opening Audacity from a terminal with:
env PULSE_LATENCY_MSEC=30 audacity
(or a similar number to 30) can cure problems, but mainly that fixes skipping or fast playback on a file that has been recorded correctly.
If that does not help, try recording using a cable from line-out into line-in (not into the mic port). Then record from the line-in by choosing the (hw) input device in Device Toolbar rather than pulse. You may need to select the line-in in ALSAmixer. This lets you avoid any pulse quirks in handling of sample rates.
If you must use pulse, see if this helps: https://forum.audacityteam.org/t/audacity-records-faster-solved/36901/26
Or better than all of those, download the song instead of trying to record it, assuming you have permission to record the song in the first place. Use your favourite search engine to find out how.
Thank you! Changing the default-sample-rate in the config file to 48000 seemed to work.
That worked for me too. (I left the alternate sample rate the same and in Audacity it still said the project was in 44100.)
I was recording again today and it was again too slow. Apparently changing the default sample rate didn’t help. Any other ideas? It seems to be random whether it works or not.
Where are you changing it?
What do you get from the command:
pacmd list-sinks |grep sample
Is playback OK other than being at the wrong speed, or does it sound stuttery?
I’ve followed the recommended change of settings but in my case the problem persists ramdomly (or in a way I can’t determine with certainty).
Apparently the problem only happens with “Monitor of built-in Audio Analog Stereo” pavucontrol setting and not with “Built-in Audio Analog Stereo”.
I repeatedly recorded while reproducing some audio with VLC, and then trying to record while reproducing the audio in this link: http://radiocut.fm/radiostation/nacional870/listen/2015/05/08/13/49/42/#
Then it slowed down. Without rebooting I closed all Firefox, VLC and Audacity, reopened them all again and the problem persisted. Did the same a second time and it was fine (perhaps the sequence of opening was not the same as before).
If anyone wants help on finding the root of the problem, let me know as to follow your directions in order to diagnose it.