audio

Does AUGraph deprecation means no more audio render callbacks?

北城余情 提交于 2020-06-12 08:17:30
问题 I have an app with an elaborated render callback that I doubt could do with AVAudioEngine. Anyway to use my AUGraph render callback ( with multiple buses ) with AVAudioEngine ? Any sample code ? 回答1: The Audio Unit API is not deprecated, only AUGraph which is presumably built on top of it. Make connections using AudioUnitSetProperty with kAudioUnitProperty_MakeConnection with an AudioUnitConnection struct. Start and stop your output unit with AudioOutputUnitStart and AudioOutputUnitStop. Set

Does AUGraph deprecation means no more audio render callbacks?

余生长醉 提交于 2020-06-12 08:17:07
问题 I have an app with an elaborated render callback that I doubt could do with AVAudioEngine. Anyway to use my AUGraph render callback ( with multiple buses ) with AVAudioEngine ? Any sample code ? 回答1: The Audio Unit API is not deprecated, only AUGraph which is presumably built on top of it. Make connections using AudioUnitSetProperty with kAudioUnitProperty_MakeConnection with an AudioUnitConnection struct. Start and stop your output unit with AudioOutputUnitStart and AudioOutputUnitStop. Set

alternatives to pyaudio for audio processing in python? [closed]

我是研究僧i 提交于 2020-06-12 07:14:01
问题 Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed last year . what other options are there for recording audio and processing the raw signal integers in python besides pyaudio? pyaudio is great, but I have found it too unstable for reliable use, especially on non-linux platforms. I don't really care too much about windows, but Mac OSX and other

alternatives to pyaudio for audio processing in python? [closed]

你离开我真会死。 提交于 2020-06-12 07:13:07
问题 Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed last year . what other options are there for recording audio and processing the raw signal integers in python besides pyaudio? pyaudio is great, but I have found it too unstable for reliable use, especially on non-linux platforms. I don't really care too much about windows, but Mac OSX and other

How to playback an .mp3 file in a Flutter app?

↘锁芯ラ 提交于 2020-06-12 06:56:31
问题 I have written a Dart web app that retrieves .mp3 files from a server and plays them back; I am trying to write a mobile version using Flutter. I know dart:web_audio is the main option for a web app, but Flutter can't find it in my SDK. I know it's there because I can compile the following to Javascript: import 'dart:html'; import 'dart:convert'; import 'dart:web_audio'; AudioContext audioContext; main() async { audioContext = new AudioContext(); var ul = (querySelector('#songs') as

Convert PCM wave data to numpy arrays and vice versa

浪尽此生 提交于 2020-06-09 18:32:12
问题 The situation I am using VAD (Voice Activity Detection) from WebRTC by using WebRTC-VAD, a Python adapter. The example implementation from the GitHub repo uses Python's wave module to read PCM data from files. Note that according to the comments the module only works with mono audio and a sampling rate of either 8000, 16000 or 32000 Hz. What I want to do Read audio data from arbitrary audio files (MP3 and WAV files) with different sampling rates, convert them into the PCM-representation that

Read wav file from python and convert frames into RAW s16le string

别来无恙 提交于 2020-06-01 07:05:43
问题 I'm reading a file in Python using either of librosa, wave or soundfile libraries and I need to push the chunk (any size) to a HTTP stream. By specification, stream string input requires me to convert frames into RAW s16le format. I tried multiple options including: soundarray,rate = librosa.load(pathToWavFile, dtype="<i2") str = b''.join(soundarray) But this just creates an empty audio stream. What am I doing wrong? 回答1: You can try pydub to convert audio to audio-segment, split audio

Xamarin Android: Detect if audio is currently playing on device

扶醉桌前 提交于 2020-05-30 06:43:17
问题 At app launch, is it possible to detect if the device's audio player or another app is currently playing music? 回答1: You can use the AudioManager to achieve this with it's IsMusicActive property: AudioManager manager = (AudioManager)Android.App.Application.Context.GetSystemService (Android.Content.Context.AudioService); var audioDetails = "Audio is " + (manager.IsMusicActive ? "on" : "off"); 来源: https://stackoverflow.com/questions/32833722/xamarin-android-detect-if-audio-is-currently-playing

Playing mp3 file through microphone with python

℡╲_俬逩灬. 提交于 2020-05-27 13:19:22
问题 Is there a way using python (and not any external software) to play a mp3 file like a microphone input? For example, I have a mp3 file and with a python script it would play it through my mic so other in a voice room would hear it. As I say it is just an example. Of course, I have done some research. I found out that I can use a software to create a virtual device and do few things to have the result. But my point is if it is possible without installing software but with some kind of python

Using FFMPEG on Google Cloud Platform

可紊 提交于 2020-05-27 06:59:07
问题 I'm storing audio files on Google Cloud Storage (through Firebase storage). I need to use FFMPEG to convert the audio file from stereo (two channels) to mono (one channel). How can I perform the above conversion on Google Cloud Platform? Update: I suspect one possibility is to use Google Compute Engine to create a virtual machine, install ffmpeg, and somehow gain access to the audio files. I'm not sure if this is the best way or even possible. So I'm still investigating. 回答1: If you have code