How to listen to audio output by application

落花浮王杯 提交于 2021-01-29 07:27:31

问题


Background

I'm working on a music player, and want any sort of audio visualizer to be part of it. I've already made a previous post specifically targeting python-vlc, but I guess not too many people know about it. Here is the post in question: How to get audio samples from python-VLC

What I need

I need a way to listen to audio output, preferably by application although it is not completely necessary. It must be a python module.

What I found

  • A bunch of tutorials regarding audio input from the microphone, which is NOT what I need
  • Two swhardware.com tutorials with audio visualizers
    • https://swharden.com/blog/2016-07-19-realtime-audio-visualization-in-python/
    • Another one from 2013 but I can't find the link
  • PyAudio tutorials also using the microphone
  • Listening audio output with python
  • terminatorX on Linux; it uses the microphone
  • squishyball on Linux; it doesn't support all audio files
  • livefft; uses pyqt4 so I couldn't even test it

Alternatives

Any python module or linux terminal that can provide a list of audio samples from any audio file. Similar to pydub.AudioSegement.get_array_of_samples()

What I don't need

  • More suggestions to use pydub's get_array_of_samples()
    • Pydub doesn't read the audio file correctly and quickly gets out of sync from already playing audio
  • More tutorials of how to get audio from the microphone
  • Answers on how to strip audio from a video file with ffmpeg

来源:https://stackoverflow.com/questions/64128779/how-to-listen-to-audio-output-by-application

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!