Skip to content
This repository has been archived by the owner on Jan 16, 2024. It is now read-only.

GStreamerMediaPlayer: accept full GstBin descriptions in "audioSink" #1923

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

balrog-kun
Copy link

@balrog-kun balrog-kun commented May 3, 2021

Description of changes:

Rather than only accept a sink element type in SampleApp config's
gstreamerMediaPlayer -> audioSink setting (like "alsasink" or
"pulsesink"), let the user specify the name plus any parameters and
even multiple subelements to go at the end of the pipeline if needed.
The following is a useful example:

"audioSink":"pulsesink stream-properties=\"props,media.role=announce\""

in combination with the pulseaudio "module-role-ducking" module to
enable attenuating music and other audio during Alexa announcements.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

fmarotta and others added 3 commits November 12, 2022 18:07
Rather than only accept a sink element type in SampleApp config's
gstreamerMediaPlayer -> audioSink setting (like "alsasink" or
"pulsesink"), let the user specify the name plus any parameters and
even multiple subelements to go at the end of the pipeline if needed.
The following is a useful example:

"audioSink":"pulsesink stream-properties=\"props,media.role=announce\""

in combination with the pulseaudio "module-role-ducking" module to
enable attenuating music and other audio during Alexa announcements.
This has probably been fixed in upstream googletest but since
avs-device-sdk doesn't accept contributions there's no point updating
the included googletest version here.
Snowman is an opensource drop-in replacement (mostly) for Snowboy.
Since they're compatible, this Keyword Detector Provider should work for
Snowboy too, but the main focus is on Snowman.

This is based on the Kitt.AI KWD code from older versions of
avs-device-sdk.
The read from audio stream will block for as long as needed so don't set
short timeout on the read call.  Also read 20x bigger chunks than what
porcupine asks, this may increase the detection delay but should lower
the CPU usage slightly which is relatively high with porcupine.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants