3

First time working with audio in python, found many examples where you can listen/stream microphone, but with a lot of googling, can't find how can I listen just my computers output audio.

The idea is to listen audio stream for comparing the sounds to wav. files, so if a specific sound is heard by the program, it prints it out. For easy example: facebook message arrives, the program compares the sound to wave file and prints "Facebook message audio heard".

  • 1
    What you are trying to do is not so easy, if the sounds it is meant to recognize are predefined you could try fingerprinting the sound samples. More information here : http://willdrevo.com/fingerprinting-and-audio-recognition-with-python/ – Chuk Ultima Feb 10 '18 at 17:09
  • Thanks for the answer, seems helpful, but theres also options to read a recorded file, or input from the microphone. So any idea how I could get the stream from my audio output? – Markus Mikkonen Feb 10 '18 at 18:52
  • Rather than trying to "listen" to audio, you may want to "listen" to message or events from a particular source and play prerecorded audio file accordingly. Which is a lot easier and there are examples available. Hopefully achieving the results close to what you desire. – Anil_M Feb 11 '18 at 00:09
  • Could you provide any links to the examples how to listen a certain source? Like could be done by hooking to a specific program or something like that? – Markus Mikkonen Feb 11 '18 at 12:58
  • You will need to use api to receive messages (facebook, twitter etc) and set alert in your code to handle message arrival event to play a audio file. Search with terms "audio alert on twitter / facebook messages via api" – Anil_M Feb 11 '18 at 20:20

0 Answers0