Using GStreamer AppSink from Python

So I decided to play a bit with how to get raw audio samples from gstreamer pipelines. This is normally done (in C or whatever) with an `appsink` element in your gstreamer pipeline. You hook up the pipeline, watch for the buffer, and then you can map it into a Numpy buffer (or whatever you like really). I haven't actually got a use-case for this right now; when I sat down I was toying with the idea of running neural nets on the samples to try to detect phonemes, but that will be some other day.

For today, consider this spike test sample code for how to use an appsink in python-gstreamer.

Still to figure out; whether you can get a nice ring-buffer or similar setup where you pre-map the Gstreamer appsink's buffers onto N numpy arrays such that gstreamer is filling out the arrays and your new-buffer callbacks just update the current ring-buffer indices.

Comments

  1. sickle cell awareness bracelet

    sickle cell awareness bracelet on 09/21/2014 12:41 a.m. #

    I’m not that much of a internet reader to be honest but your blogs really nice, keep it up!
    I'll go ahead and bookmark your site to come back in the future.
    All the best

  2. africanpartybeads.com

    africanpartybeads.com on 09/21/2014 3:01 a.m. #

    Many in the stories of fairies are localized versions of tales that originated inside
    the same lands how the ancestors in the people of Newfoundland came from.
    Trees could also add a substantial level of value to your home.

    There are even reports which it acts as an apatite suppressant
    in most people. Fall is not a good time to prune deciduous trees because it will cause a late burst of latest growth.

  3. diabetes awareness bracelet

    diabetes awareness bracelet on 09/21/2014 5:23 a.m. #

    It's really very complex in this active life to listen news on Television, thus I just use internet for that purpose, and obtain the hkttest news.

Pingbacks

Pingbacks are closed.

Post your comment