Re: [orca-list] Recording audio from the soundcard
- From: luciano de souza <luchyanus gmail com>
- To: lsmithso hare demon co uk
- Cc: orca-list gnome org
- Subject: Re: [orca-list] Recording audio from the soundcard
- Date: Thu, 16 Jan 2014 12:57:46 -0200
The content of ""pactl" is not very easy to understand. For this reason, I try:
parec -d 0 > output.wav
parec -d 1 > output.wav
parec -d 2 > output.wav
The generated wave failed in all cases. I can't understand the meaning
of "pactl" contents. In spite of this, I could not find the word
"pulse audio", but only "alsa". If Gstreamer handles with Alsa, so
it's explainable why could be successful at least once.
I am not sure if I use pulseaudio or Alsa. I have installed the
standard version of Ubuntu 13.10 and Orca is that coming with this
distro. However, thinking about the results got up to now, it seems
more probably that I use Alsa. Actually, I can neither say that I
understand what is Pulse Audio or Alsa. I know only this things are
important for the sound. I don't know anything else. Perhaps, becose
of it, I can't say more precisly information.
But, the results up to know is: "parec" did not work in all cases.
"gst-launch" worked, but stoped to work after the computer restarting
and, sometimes, in the midle of the section.
Bellow, it's the output of "pactl" command:
Fonte #0
Estado: SUSPENDED
Nome: alsa_output.pci-0000_01_00.1.hdmi-stereo.monitor
Descrição: Monitor of Redwood HDMI Audio [Radeon HD 5000 Series]
Digital Stereo (HDMI)
Driver: module-alsa-card.c
Especificação da amostragem: s16le 2ch 44100Hz
Mapa dos canais: front-left,front-right
Módulo proprietário: 5
Mudo: no
Volume: 0: 100% 1: 100%
0: 0,00 dB 1: 0,00 dB
balanço 0,00
Volume base: 100%
0,00 dB
Monitor do destino: alsa_output.pci-0000_01_00.1.hdmi-stereo
Latência: 0 usec, 0 usec configurado
Sinalizadores: DECIBEL_VOLUME LATENCY
Propriedades:
device.description = "Monitor of Redwood HDMI Audio [Radeon HD 5000
Series] Digital Stereo (HDMI)"
device.class = "monitor"
alsa.card = "1"
alsa.card_name = "HD-Audio Generic"
alsa.long_card_name = "HD-Audio Generic at 0xfbdbc000 irq 46"
alsa.driver_name = "snd_hda_intel"
device.bus_path = "pci-0000:01:00.1"
sysfs.path = "/devices/pci0000:00/0000:00:01.0/0000:01:00.1/sound/card1"
device.bus = "pci"
device.vendor.id = "1002"
device.vendor.name = "Advanced Micro Devices, Inc. [AMD/ATI]"
device.product.id = "aa60"
device.product.name = "Redwood HDMI Audio [Radeon HD 5000 Series]"
device.string = "1"
module-udev-detect.discovered = "1"
device.icon_name = "audio-card-pci"
Formatos:
pcm
Fonte #1
Estado: IDLE
Nome: alsa_output.pci-0000_00_1b.0.analog-stereo.monitor
Descrição: Monitor of Áudio interno Estéreo analógico
Driver: module-alsa-card.c
Especificação da amostragem: s16le 2ch 44100Hz
Mapa dos canais: front-left,front-right
Módulo proprietário: 6
Mudo: no
Volume: 0: 100% 1: 100%
0: 0,00 dB 1: 0,00 dB
balanço 0,00
Volume base: 100%
0,00 dB
Monitor do destino: alsa_output.pci-0000_00_1b.0.analog-stereo
Latência: 0 usec, 371519 usec configurado
Sinalizadores: DECIBEL_VOLUME LATENCY
Propriedades:
device.description = "Monitor of Áudio interno Estéreo analógico"
device.class = "monitor"
alsa.card = "0"
alsa.card_name = "HDA Intel MID"
alsa.long_card_name = "HDA Intel MID at 0xfbcf8000 irq 44"
alsa.driver_name = "snd_hda_intel"
device.bus_path = "pci-0000:00:1b.0"
sysfs.path = "/devices/pci0000:00/0000:00:1b.0/sound/card0"
device.bus = "pci"
device.vendor.id = "8086"
device.vendor.name = "Intel Corporation"
device.product.id = "3b56"
device.product.name = "5 Series/3400 Series Chipset High Definition Audio"
device.form_factor = "internal"
device.string = "0"
module-udev-detect.discovered = "1"
device.icon_name = "audio-card-pci"
Formatos:
pcm
Fonte #2
Estado: SUSPENDED
Nome: alsa_input.pci-0000_00_1b.0.analog-stereo
Descrição: Áudio interno Estéreo analógico
Driver: module-alsa-card.c
Especificação da amostragem: s16le 2ch 44100Hz
Mapa dos canais: front-left,front-right
Módulo proprietário: 6
Mudo: no
Volume: 0: 14% 1: 14%
0: -51,00 dB 1: -51,00 dB
balanço 0,00
Volume base: 10%
-60,00 dB
Monitor do destino: n/a
Latência: 0 usec, 0 usec configurado
Sinalizadores: HARDWARE HW_MUTE_CTRL HW_VOLUME_CTRL DECIBEL_VOLUME LATENCY
Propriedades:
alsa.resolution_bits = "16"
device.api = "alsa"
device.class = "sound"
alsa.class = "generic"
alsa.subclass = "generic-mix"
alsa.name = "ALC888 Analog"
alsa.id = "ALC888 Analog"
alsa.subdevice = "0"
alsa.subdevice_name = "subdevice #0"
alsa.device = "0"
alsa.card = "0"
alsa.card_name = "HDA Intel MID"
alsa.long_card_name = "HDA Intel MID at 0xfbcf8000 irq 44"
alsa.driver_name = "snd_hda_intel"
device.bus_path = "pci-0000:00:1b.0"
sysfs.path = "/devices/pci0000:00/0000:00:1b.0/sound/card0"
device.bus = "pci"
device.vendor.id = "8086"
device.vendor.name = "Intel Corporation"
device.product.id = "3b56"
device.product.name = "5 Series/3400 Series Chipset High Definition Audio"
device.form_factor = "internal"
device.string = "front:0"
device.buffering.buffer_size = "65536"
device.buffering.fragment_size = "32768"
device.access_mode = "mmap+timer"
device.profile.name = "analog-stereo"
device.profile.description = "Estéreo analógico"
device.description = "Áudio interno Estéreo analógico"
alsa.mixer_name = "Realtek ALC888"
alsa.components = "HDA:10ec0888,103c2a9c,00100202"
module-udev-detect.discovered = "1"
device.icon_name = "audio-card-pci"
Portas:
analog-input-microphone-front: Microfone frontal (priority: 8500,
not available)
analog-input-microphone-rear: Microfone traseiro (priority: 8200,
not available)
analog-input-linein: Entrada de linha (priority: 8100, not available)
Porta ativa: analog-input-linein
Formatos:
pcm
2014/1/13, lsmithso hare demon co uk <lsmithso hare demon co uk>:
Hi: If you are running pulseaudio (the default for vinux I believe),
then the command "parec" may be easier to understand.
parec -d 1 > recording.wav
Records from the sound card on my system. You may have to change the
value of the -d arg to suit your hardware. It will be a small integer
starting at 0. You can guess this, or you can be more scientific and
use:
pactl list sources
Another way to do this is with gstreamer:
gst-launch pulsesrc device=1 ! autoaudiosink
Will connect the mic to the default sound output device. You can also
record with gstreamer:
gst-launch pulsesrc device=1 ! wavenc ! filesink
location=recording.wav
luciano de souza writes:
> If amixer is configured, I think I could record with arecord explained
at:
>
http://carthick.wordpress.com/2007/11/26/linux-recording-soundcard-output-using-arecord/
>
> A command to record 10 seconds could be:
>
> arecord -d 10 -f cd -t wav -D copy foobar.wav
>
> The problem is that I don't understand the language of manuals.
> "amixer scontrols" list the controls, but what Is called control?
> Well, the answer was
>
> Simple mixer control 'Master',0
> Simple mixer control 'Headphone',0
> Simple mixer control 'PCM',0
> Simple mixer control 'Front',0
> Simple mixer control 'Front Mic',0
> Simple mixer control 'Front Mic Boost',0
> Simple mixer control 'Surround',0
> Simple mixer control 'Center',0
> Simple mixer control 'LFE',0
> Simple mixer control 'Side',0
> Simple mixer control 'Line',0
> Simple mixer control 'Line Boost',0
> Simple mixer control 'IEC958',0
> Simple mixer control 'IEC958 Default PCM',0
> Simple mixer control 'Capture',0
> Simple mixer control 'Capture',1
> Simple mixer control 'Auto-Mute Mode',0
> Simple mixer control 'Input Source',0
> Simple mixer control 'Input Source',1
> Simple mixer control 'Rear Mic',0
> Simple mixer control 'Rear Mic Boost',0
>
> I don't understand what it means. But it points out the word
> "Capture". Perhaps, 'Capture',0 and 'Capture',1 is two channels of
> recording. I don't know any characteristics of my soundcard. Actually,
> when I wanted to record, I expected two find an application with two
> buttons: Record from the microphone, Record from the soundcard.
>
> Navigating from Internet, I found the command:
>
> amixer sget 'Input source',0
>
> I don't know what is 'Input source',0, but I tried to do:
>
> amixer sget 'Capture',0
>
> My hopeness is that command changed my Alsa settings to record from
> the soundcard, but after doing "arecord -d 10 -f cd -t wav -D copy
> foobar.wav", the file generated remained empty.
>
> Even if I understand the words of the amixer manual, I can't
> understand the meaning of it. My all experiance was to record sounds
> from the microphone and the soundcard with an Windows application, but
> the name of options was something like "Record from microphone" and
> "Record from soundcard".
>
> The difficulties are terible: I don't understand about sound settings,
> about Alsa, my english is not very well, I don't know very much about
> shellscript... Would be there a more simpler way to a beginer as me
> recording sounds from the soundcard?
>
> If the interface of Audio-Mixer was accessible, I could use
> Audio-Record and to do everything with graphical interfaces.
>
> 2014/1/11, Jason White <jason jasonjgw net>:
> > luciano de souza <luchyanus gmail com> wrote:
> >> Does someone have a tip to record sounds from the soundcard using
> >> terminal or a graphical application?
> >> I have certain preference to do it by means of terminal, but any tip
is
> >> welcome!
> >
> > You could just use amixer or alsamixer to configure the input volume
of
> > your
> > audio device. Amixer is a command line tool; alsamixer is a terminal
> > application. For recording, have a look at ecasound and read its
> > documentation
> > to find out whether it will meet your requirements.
> >
> > If you're using Pulse Audio, volume levels can be configured with
pacmd
> > from
> > your shell prompt. I'm sure there are volume controls in GNOME as
well,
> > which
> > Orca should be able to access. Under Pulse Audio, the microphone input
is
> > referred to as a "source", whereas the audio output is referred to as
a
> > "sink". Thus you would need to use the list-sources command first,
obtain
> > the
> > index number of your microphone, then use set-source-volume to adjust
it -
> > see
> > the pulse-cli-syntax(5) manual page.
> >
> > _______________________________________________
> > orca-list mailing list
> > orca-list gnome org
> > https://mail.gnome.org/mailman/listinfo/orca-list
> > Visit http://live.gnome.org/Orca for more information on Orca.
> > The manual is at
> > http://library.gnome.org/users/gnome-access-guide/nightly/ats-2.html
> > The FAQ is at http://live.gnome.org/Orca/FrequentlyAskedQuestions
> > Log bugs and feature requests at http://bugzilla.gnome.org
> > Find out how to help at http://live.gnome.org/Orca/HowCanIHelp
> >
>
>
> --
> Luciano de Souza
> _______________________________________________
> orca-list mailing list
> orca-list gnome org
> https://mail.gnome.org/mailman/listinfo/orca-list
> Visit http://live.gnome.org/Orca for more information on Orca.
> The manual is at
http://library.gnome.org/users/gnome-access-guide/nightly/ats-2.html
> The FAQ is at http://live.gnome.org/Orca/FrequentlyAskedQuestions
> Log bugs and feature requests at http://bugzilla.gnome.org
> Find out how to help at http://live.gnome.org/Orca/HowCanIHelp
--
Les Smithson
--
Luciano de Souza
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]