Skip to content

Latest commit

 

History

10 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

gst-awkward

A small gstreamer application that plays music, but shuts up whenever someone speaks. Quit awkward silences today!

Usage

  • Match dependencies:
    • Gstreamer
    • Alsa-utils [optional]: apt install alsa-utils
    • Gnuplot [optional]: apt install gnuplot
  • Clone this repo git clone https://github.com/pabsan-0/gst-awkward
  • Set your device configuration in the src/main.c #defines
  • Build the tool: make
  • Run the app with ./main.o

The audio essentials

  • Audio loopback sudo modprobe snd-aloop
  • List mic-like devices arecord -l
  • List speaker-like devices aplay -l
  • Hardware spec: hw:x,y,z hw:card,device,subdevice
    • x: Card
    • y: Device
    • z: Subdevice
  • Gstreamer elements:
    • alsasink, alsasrc: Advanced Linux Sound Architecture
    • audioconvert
    • volume, level: for setting/reading levels
    • decodebin, autovideosink, autovideosrc

Snippets:

# Playing audio file in a loop
gst-launch-1.0 multifilesrc loop=1 location=media/short.mp3 ! decodebin ! audioconvert ! alsasink

# Introducing delay
gst-launch-1.0 audiotestsrc ! queue max-size-buffers=0 max-size-time=0 max-size-bytes=0 min-threshold-time=1000000000000 ! autoaudiosink

# Mic to speaker with native delay (fractions of a sec)
gst-launch-1.0 alsasrc device="hw:3,0,0" ! alsasink 

# Mic to speaker fancier
gst-launch-1.0 alsasrc device="hw:3,0,0" ! volume volume=1.5 ! level message=TRUE ! alsasink 

Links

Acknowledgements

About

Gstreamer audio application that plays music when mic is silent

Topics

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages