Real-time sound classification of live audio stream using TensorFlow?

Hi there,

I’m building a VR app that involves real-time sound classification of a live audio stream from the microphone using TensorFlow. Basically I’m trying to detect the presence and intensity of a certain sound(in particular a bell-like sound) in the audio stream captured by the microphone, and then use the intensity value subsequently.
Now while there’s already a tutorial on sound classification using TensorFlow, it only works for pre-recorded audio clips and not live audio streams.
So I’m wondering if anybody can give some pointers on doing this with a live audio stream? (pardon my ignorance as I’m still new to TensorFlow :slight_smile:

Many thanks!
Melvin Eng.

Have you tried what Gemini answers on this? Basically, capture live audio using pyaudio, preprocess it into features like MFCCs, and use a TensorFlow model for real-time predictions. Continuously process the audio data to get sound intensity and integrate this setup into your VR app to trigger events based on the detected intensity.