Skip to content

Instantly share code, notes, and snippets.

View mxchinegod's full-sized avatar
💭
🐛fixing

Dylan mxchinegod

💭
🐛fixing
View GitHub Profile
@wiseman
wiseman / broadcastify_listen.py
Last active April 15, 2024 22:51
Python 3 code for taking an mp3 stream, such as a police scanner feed from broadcastify, and running it through speech recognition.
"""Does utterance segmentation and speech recognition on an mp3 stream
(like from broadcastify...)
Requires that ffmpeg be installed, and a Microsoft cognitive speech
services API key
(see https://azure.microsoft.com/en-us/try/cognitive-services/?api=speech-services).
"""
import audioop
import collections