Discussion:
Intro, and, first question
Jacob Kruger
2016-11-21 07:39:38 UTC
Permalink
Hi there

I am based here in South Africa, and, my primary use of speakUp, and,
linux systems at the moment is to do with raspberry pi mini-computers,
running under the raspbian version of linux.

My sort of question might be totally unrelated, but, thought would ask.

I have set up a sort of menu system that launches after the pi boots up,
making use of python, but, this isn't really the issue.

I am trying to use either arecord, or the rec command from sox to record
audio input from a microphone plugged into the unit, via an external USb
audio adapter since the raspberry pi doesn't have it's own form of audio
input, and, while the normal audio, speakUp's output is working fine
through the built-in 3.5mm analog audio output socket, when I try
implement recording using either of the above packages, both of which I
think are based on the alsa package, I get an error message, which I
think is related to a form of audio buffering, or something, and, while
this command works fine in another test environment - vinux running in a
VMWare virtual instance here on my windows 10 PC, on both the raspberry
pi 2 and the raspberry pi 3, I get the following error message:
Main:722: audio open error: No such file or directory

Now, ther reason am asking this here is since am just wondering if it's
not maybe due to the version of speakUp running here - think was tweaked
by Mike, who's connected to raxpberryvi.org - now doing something like
hogging all audio channels, for whatever reason, although wouldn't
expect it to have much to do with audio input channels?

Unfortunately don't have an actual full PC running any version of
speakUp, but, for example, the recording commands I am trying to make
use of work fine under a VMWare version of vinux, but, there having orca
running, and, not speakUp.

Now, sorry if this is somewhat off-topic...<smile>

Stay well

Jacob Kruger
Blind Biker
Skype: BlindZA
"Resistance is futile, but, acceptance is versatile..."
Kyle
2016-11-21 13:03:36 UTC
Permalink
Try something like
sudo modprobe snd_usb_audio
I'm thinking your problem is due to the fact that the USB audio device
may not be detected automatically. You can also try running something like
arecord -l
to find the list of devices that are available for audio input.
Sent from the ride
Jacob Kruger
2016-11-21 14:31:32 UTC
Permalink
Will try that first command, but, if run arecord -l, it does show the
USB adapter as an input device.


Thanks


Jacob Kruger
Blind Biker
Skype: BlindZA
"Resistance is futile, but, acceptance is versatile..."
Post by Kyle
Try something like
sudo modprobe snd_usb_audio
I'm thinking your problem is due to the fact that the USB audio device
may not be detected automatically. You can also try running something like
arecord -l
to find the list of devices that are available for audio input.
Sent from the ride
_______________________________________________
Speakup mailing list
http://linux-speakup.org/cgi-bin/mailman/listinfo/speakup
Gregory Nowak
2016-11-21 20:21:25 UTC
Permalink
On the rpi2, if you use arecord without specifying an input device, it
tries to record through the rpi2's sound card, which is of course not
possible, and results in the error message you posted. You need to
specifically give arecord the device to use for capturing from.

Greg
Post by Jacob Kruger
Will try that first command, but, if run arecord -l, it does show
the USB adapter as an input device.
Thanks
--
Free domains: http://www.eu.org/ or mail dns-***@EU.org
Zachary Kline
2016-11-21 20:30:49 UTC
Permalink
As an alternative, couldn’t you set up a .asoundrc file to specify the default recording device? I don’t know much about the syntax for such things, but in theory that would avoid having to do so every time.
I know the syntax is documented somewhere, probably on the Alsa web site.
Post by Gregory Nowak
On the rpi2, if you use arecord without specifying an input device, it
tries to record through the rpi2's sound card, which is of course not
possible, and results in the error message you posted. You need to
specifically give arecord the device to use for capturing from.
Greg
Post by Jacob Kruger
Will try that first command, but, if run arecord -l, it does show
the USB adapter as an input device.
Thanks
--
_______________________________________________
Speakup mailing list
http://linux-speakup.org/cgi-bin/mailman/listinfo/speakup
Jacob Kruger
2016-11-21 22:47:34 UTC
Permalink
Not too much of an issue since am sort of hard-coding the recording
command in my python code, but, seems like if you run through the amixer
command, which might try to bring up a GUI dialogue, then you can do
things like specify the default device, etc., but, like said, not too
much of an issue since, among other things, my python code sort of
offers longer, more detailed commands to then be executed in
succession/combination, using the subprocess.call() function.


Stay well


Jacob Kruger
Blind Biker
Skype: BlindZA
"Resistance is futile, but, acceptance is versatile..."
Post by Zachary Kline
As an alternative, couldn’t you set up a .asoundrc file to specify the default recording device? I don’t know much about the syntax for such things, but in theory that would avoid having to do so every time.
I know the syntax is documented somewhere, probably on the Alsa web site.
Post by Gregory Nowak
On the rpi2, if you use arecord without specifying an input device, it
tries to record through the rpi2's sound card, which is of course not
possible, and results in the error message you posted. You need to
specifically give arecord the device to use for capturing from.
Greg
Post by Jacob Kruger
Will try that first command, but, if run arecord -l, it does show
the USB adapter as an input device.
Thanks
--
_______________________________________________
Speakup mailing list
http://linux-speakup.org/cgi-bin/mailman/listinfo/speakup
_______________________________________________
Speakup mailing list
http://linux-speakup.org/cgi-bin/mailman/listinfo/speakup
Jacob Kruger
2016-11-21 22:43:23 UTC
Permalink
Thanks, Greg.


Have actually just found out that specifying device 1 works.


Oddly enough, if I run the arecord -l command, it only shows device 1,
but, suppose that's since it's offering input, but, had thus not
realised there was also a device 0 that just wasn't showing up.


In other words, the following command does now run through, but, with
one more minor issue that will explain below:

arecord -D plughw:1 -f dat testing.wav


The issue have now come across is that it's most likely recording at a
really low volume, or else will need to double check recording with
different microphones hooked up to the USB audio adapter, since when I
then copied the output file to my main PC, and, boosted it's volume
using audacity, I just picked up some crackles, but, no actual voice
input, but, will try it out with a different microphone now.


Main thing is it didn't bring up that error message, and, ran through,
producing the output .wav file, etc.


Thanks, again


Jacob Kruger
Blind Biker
Skype: BlindZA
"Resistance is futile, but, acceptance is versatile..."
Post by Gregory Nowak
On the rpi2, if you use arecord without specifying an input device, it
tries to record through the rpi2's sound card, which is of course not
possible, and results in the error message you posted. You need to
specifically give arecord the device to use for capturing from.
Greg
Post by Jacob Kruger
Will try that first command, but, if run arecord -l, it does show
the USB adapter as an input device.
Thanks
--
_______________________________________________
Speakup mailing list
http://linux-speakup.org/cgi-bin/mailman/listinfo/speakup
Gregory Nowak
2016-11-21 23:23:35 UTC
Permalink
Jacob, if you haven't done so already, try running:

amixer -c1

to see if your audio adapter has capture, mic, or +20db levels that
you can adjust and/or unmute.

Greg
Post by Jacob Kruger
Thanks, Greg.
Have actually just found out that specifying device 1 works.
Oddly enough, if I run the arecord -l command, it only shows device
1, but, suppose that's since it's offering input, but, had thus not
realised there was also a device 0 that just wasn't showing up.
In other words, the following command does now run through, but,
arecord -D plughw:1 -f dat testing.wav
The issue have now come across is that it's most likely recording at
a really low volume, or else will need to double check recording
with different microphones hooked up to the USB audio adapter, since
when I then copied the output file to my main PC, and, boosted it's
volume using audacity, I just picked up some crackles, but, no
actual voice input, but, will try it out with a different microphone
now.
Main thing is it didn't bring up that error message, and, ran
through, producing the output .wav file, etc.
Thanks, again
Jacob Kruger
Blind Biker
Skype: BlindZA
"Resistance is futile, but, acceptance is versatile..."
--
web site: http://www.gregn.net
gpg public key: http://www.gregn.net/pubkey.asc
skype: gregn1
(authorization required, add me to your contacts list first)
If we haven't been in touch before, e-mail me before adding me to your contacts.

--
Free domains: http://www.eu.org/ or mail dns-***@EU.org
Jacob Kruger
2016-11-22 08:25:45 UTC
Permalink
Ok, got it sorted - was playing around with amixer set commands, but,
after a couple of tries, switching microphone between sockets on USB
audio adapter, and, making sure everything was properly inserted, etc.,
it does now record the audio input from the microphone.


So, to try put this on-topic, yes, it had nothing to do with
speakUp...<smile>


On a side note, relating to speakUp, one other thing is since am trying
to handle this using just a USB numpad plugged in, since the keys there
get used by speakUp, I seem to need to hold in numlock key while then
typing in a sort of menu option, like 1, before hitting enter, but,
that's a minor thing that will just need to be explained to guys.


Stay well


Jacob Kruger
Blind Biker
Skype: BlindZA
"Resistance is futile, but, acceptance is versatile..."
Post by Jacob Kruger
Thanks, Greg.
Have actually just found out that specifying device 1 works.
Oddly enough, if I run the arecord -l command, it only shows device 1,
but, suppose that's since it's offering input, but, had thus not
realised there was also a device 0 that just wasn't showing up.
In other words, the following command does now run through, but, with
arecord -D plughw:1 -f dat testing.wav
The issue have now come across is that it's most likely recording at a
really low volume, or else will need to double check recording with
different microphones hooked up to the USB audio adapter, since when I
then copied the output file to my main PC, and, boosted it's volume
using audacity, I just picked up some crackles, but, no actual voice
input, but, will try it out with a different microphone now.
Main thing is it didn't bring up that error message, and, ran through,
producing the output .wav file, etc.
Thanks, again
Jacob Kruger
Blind Biker
Skype: BlindZA
"Resistance is futile, but, acceptance is versatile..."
Post by Gregory Nowak
On the rpi2, if you use arecord without specifying an input device, it
tries to record through the rpi2's sound card, which is of course not
possible, and results in the error message you posted. You need to
specifically give arecord the device to use for capturing from.
Greg
Post by Jacob Kruger
Will try that first command, but, if run arecord -l, it does show
the USB adapter as an input device.
Thanks
--
_______________________________________________
Speakup mailing list
http://linux-speakup.org/cgi-bin/mailman/listinfo/speakup
_______________________________________________
Speakup mailing list
http://linux-speakup.org/cgi-bin/mailman/listinfo/speakup
Loading...