Skip to content

Instantly share code, notes, and snippets.

@benoit-cty
Last active September 20, 2019 20:14
Show Gist options
  • Save benoit-cty/37ce2b6cb4aaafe37cb2f14f41482e99 to your computer and use it in GitHub Desktop.
Save benoit-cty/37ce2b6cb4aaafe37cb2f14f41482e99 to your computer and use it in GitHub Desktop.
Project Alice confs
# UPDATED : seems to work but I have still some problems I think
# use samplerate to resample as speexdsp resample is bad
defaults.pcm.rate_converter "samplerate"
pcm.!default {
type asym
playback.pcm "playback"
capture.pcm "ac108"
}
pcm.playback {
type plug
slave.pcm "dmixed"
}
pcm.dmixed {
type dmix
# slave.pcm "hw:ALSA"
slave.pcm "hw:1"
slave.rate 16000
ipc_key 555555
ipc_perm 0666 # mixing for all users
}
pcm.ac108 {
type plug
slave.pcm "multiapps"
}
pcm.multiapps {
type dsnoop
#ac108-slavepcm "hw:seeed4micvoicec"
slave {
pcm "hw:0,0"
# format "S16_LE"
rate 16000
}
ipc_key 666666
ipc_perm 0666 # mixing for all users
}
[snips-audio-server]
mike = "ac108"
alsa_capture = "default"
alsa_playback = "default"
@Psychokiller1888
Copy link

# The IPC key of dmix or dsnoop plugin must be unique
# If 555555 or 666666 is used by other processes, use another one

# use samplerate to resample as speexdsp resample is bad
defaults.pcm.rate_converter "samplerate"

pcm.!default {
    type asym
    playback.pcm "playback"
    capture.pcm "ac108"
}

pcm.playback {
    type plug
    slave.pcm "dmixed"
}

pcm.dmixed {
    type dmix
    slave.pcm "hw:ALSA"
    ipc_key 555555 
}

pcm.ac108 {
    type plug
    slave.pcm "multiapps"
}

pcm.multiapps {
    type dsnoop
    ac108-slavepcm "hw:seeed4micvoicec"
    ipc_key 666666
}

@benoit-cty
Copy link
Author

pi@projectalice:~ $ aplay -L
null
Discard all samples (playback) or generate zero samples (capture)
default
playback
dmixed
ac108
multiapps
pi@projectalice:~ $ arecord -L
null
Discard all samples (playback) or generate zero samples (capture)
default
playback
dmixed
ac108
multiapps
sysdefault:CARD=seeed4micvoicec
seeed-4mic-voicecard,
Default Audio Device
dmix:CARD=seeed4micvoicec,DEV=0
seeed-4mic-voicecard,
Direct sample mixing device
dsnoop:CARD=seeed4micvoicec,DEV=0
seeed-4mic-voicecard,
Direct sample snooping device
hw:CARD=seeed4micvoicec,DEV=0
seeed-4mic-voicecard,
Direct hardware device without any conversions
plughw:CARD=seeed4micvoicec,DEV=0
seeed-4mic-voicecard,
Hardware device with all software conversions
pi@projectalice:~ $

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment