audio device configuration
This commit is contained in:
@@ -1,6 +1,8 @@
|
|||||||
pcm.my_sound_device {
|
pcm.my_sound_device {
|
||||||
type hw
|
type hw
|
||||||
card USB
|
card USB
|
||||||
|
# card PCH
|
||||||
|
# card Headphones
|
||||||
device 0
|
device 0
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -45,7 +45,13 @@ The recordings must be edited a little bit so some audio processing tool is need
|
|||||||
Configuration
|
Configuration
|
||||||
-------------
|
-------------
|
||||||
|
|
||||||
If your sound device is other then USB type then change the line `card USB` in ALSA config
|
First try using default audio device for playback and recording. Edit `dog-trainer.py` and activate `PLAY_DEVICE="default"` and `REC_DEVICE="default"`
|
||||||
|
> `nano dog-trainer.py`
|
||||||
|
|
||||||
|
Skip to the next section `Run it!`. If either playback or recording does not work check your sound cards
|
||||||
|
> `aplay -L | grep ^hw:CARD=`
|
||||||
|
|
||||||
|
If your sound device is other then `USB` then change the line `card USB` in ALSA config
|
||||||
> `nano .asoundrc`
|
> `nano .asoundrc`
|
||||||
|
|
||||||
Install the ALSA config file
|
Install the ALSA config file
|
||||||
|
|||||||
@@ -4,8 +4,12 @@ from datetime import datetime
|
|||||||
import subprocess
|
import subprocess
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
|
# PLAY_DEVICE = "default" # Playback/recording through the PulseAudio sound server
|
||||||
|
# REC_DEVICE = "default" # Playback/recording through the PulseAudio sound server
|
||||||
|
|
||||||
PLAY_DEVICE = "my_sound_device_with_converter" # as defined in '~/.asoundrc'
|
PLAY_DEVICE = "my_sound_device_with_converter" # as defined in '~/.asoundrc'
|
||||||
REC_DEVICE = "my_sound_device" # as defined in '~/.asoundrc'
|
REC_DEVICE = "my_sound_device" # as defined in '~/.asoundrc'
|
||||||
|
|
||||||
MAX_RECORDING_TIME = 30 # limit recordings to only e.g. 30 seconds long
|
MAX_RECORDING_TIME = 30 # limit recordings to only e.g. 30 seconds long
|
||||||
TRIM_RECORDING_END = 0.8 # remove the clicking noise from the end of recordings
|
TRIM_RECORDING_END = 0.8 # remove the clicking noise from the end of recordings
|
||||||
RECORD_BUTTON_PRESS_TIME = 2 # pressing and holding a button longer then e.g. 2 seconds triggers recording otherwise playing
|
RECORD_BUTTON_PRESS_TIME = 2 # pressing and holding a button longer then e.g. 2 seconds triggers recording otherwise playing
|
||||||
|
|||||||
Reference in New Issue
Block a user