portaudio

Output in PortAudio

て烟熏妆下的殇ゞ 提交于 2021-01-29 08:26:37
问题 I am trying to learn PortAudio, I am following the tutorials in doc/src/tutorials , this is the code in writing_a_callback.dox : typedef struct { float left_phase; float right_phase; } paTestData; /* This routine will be called by the PortAudio engine when audio is needed. ** It may called at interrupt level on some machines so don't do anything ** that could mess up the system like calling malloc() or free(). */ static int patestCallback( const void *inputBuffer, void *outputBuffer, unsigned

Reroute analogue audio signal using Python

自作多情 提交于 2020-12-15 04:55:13
问题 I'm trying to use Python to 'mic-monitor', i.e., to playback the mic signal through the headphones in real-time, in addition to any other output signal from the PC. I can accomplish this by amending my PC's playback settings, but I want to do it with Python, so that I can program a Raspberry Pi to mic-monitor my cheap headset for the PS4. I can almost accomplish this with PyAudio or sounddevice, but there is a small but significant delay. From a previous question, I believe this is an

Reroute analogue audio signal using Python

空扰寡人 提交于 2020-12-15 04:54:28
问题 I'm trying to use Python to 'mic-monitor', i.e., to playback the mic signal through the headphones in real-time, in addition to any other output signal from the PC. I can accomplish this by amending my PC's playback settings, but I want to do it with Python, so that I can program a Raspberry Pi to mic-monitor my cheap headset for the PS4. I can almost accomplish this with PyAudio or sounddevice, but there is a small but significant delay. From a previous question, I believe this is an

input delay with PortAudio callback and ASIO sdk

徘徊边缘 提交于 2020-12-05 12:47:51
问题 I'm trying to get the input from my guitar to be played through my computer using the portaudio library and the ASIO sdk. I have been following some of the tutorials on the official website to get the basics set up. Currently I got it working so that portaudio is listening to the right input and output device and I have the callback setup to just output the input and do nothing with it like this: static int paTestCallback(const void *inputBuffer, void *outputBuffer, unsigned long

三个小白是如何在三个月内搭一个基于kaldi的嵌入式在线语音识别系统的

五迷三道 提交于 2020-08-16 08:23:52
前面的博客里说过最近几个月我从传统语音(语音通信)切到了智能语音(语音识别)。刚开始是学语音识别领域的基础知识,学了后把自己学到的写了PPT给组内同学做了presentation( 语音识别传统方法(GMM+HMM+NGRAM)概述 )。一段时间后老板就布置了具体任务:在我们公司自己的ARM芯片上基于kaldi搭建一个在线语音识别系统,三个人花三个月左右的时间完成。由于我们都是语音识别领域的小白,要求可以低些,就用传统的GMM-HMM来实现。说实话接到这个任务我们心里是有点没底的,不知道能不能按时完成,毕竟我们对语音识别不熟,对kaldi不熟。既然任务下达了,硬着头皮也要上,并尽最大努力完成。我本能的先在网上用百度/google搜了搜,看有没有一些经验可供参考,好让我们少走弯路。遗憾的是没搜到有价值的东西。没办法,我们只能根据自己以前的经验摸索着前进。最终我们按计划花了不到三个月的时间完成了嵌入式平台上在线语音识别系统的搭建。虽然只是demo,但是为后面真正做商用的产品打下了良好的基础,累积了不少的经验。今天我就把我们怎么做的分享出来,给也想做类似产品的朋友做个参考。 既然作为一个项目来做,就要有计划,分几个阶段完成这个项目。我在学习语音识别基础知识时对kaldi有一个简单的了解(在做语音识别前就已知kaldi的大名,没办法这几年人工智能(AI)太热了

PyAudio playback problems with patched PortAudio on Ubuntu

我是研究僧i 提交于 2020-06-29 04:08:27
问题 I have put together the following code using PyAudio for playing a wav file, following the official code examples, and I encounter consistent trouble getting a clean playback with it. The trouble is not specific to certain files, it ensues for audio wav files coming from multiple different sources and having different (standard) sample frequencies, all alike. Details With the synchronous stream writing variant demonstrated in the code below, most of the time the wav file will not play

PyAudio playback problems with patched PortAudio on Ubuntu

ぃ、小莉子 提交于 2020-06-29 04:08:11
问题 I have put together the following code using PyAudio for playing a wav file, following the official code examples, and I encounter consistent trouble getting a clean playback with it. The trouble is not specific to certain files, it ensues for audio wav files coming from multiple different sources and having different (standard) sample frequencies, all alike. Details With the synchronous stream writing variant demonstrated in the code below, most of the time the wav file will not play

Application doesn't ask for permission to access microphone in MacOS 10.14 Mojave

会有一股神秘感。 提交于 2020-05-13 08:05:15
问题 I'm part of a team developing applications for flight simulation. One of these applications is running also on MacOS and needs access to the microphone to communicate with online virtual air traffic control. Starting with MacOS 10.14 microphone access is no longer working. It used to work perfectly in any previous version of MacOS. I've read that starting with 10.14, MacOS will ask the user for permission, but this dialog never appears. Using portaudio as the audio library, audio input stream

I can't run a simple code using pyaudio - [Errno -9996] Invalid output device (no default output device)

喜你入骨 提交于 2020-02-25 03:56:20
问题 (I'm new at python) I'm trying to run a simple code about pyaudio. I just copied and pasted a code that I found on the pyaudio web site. I get this error: OSError Traceback (most recent call last) <ipython-input-7-3fc52ceecbf3> in <module>() 15 channels=wf.getnchannels(), 16 rate=wf.getframerate(), ---> 17 output=True) 18 19 # read data /home/gustavolg/anaconda3/lib/python3.5/site-packages/pyaudio.py in open(self, *args, **kwargs) 748 """ 749 --> 750 stream = Stream(self, *args, **kwargs) 751

how to install portaudio on pi properly

谁都会走 提交于 2020-02-02 16:16:09
问题 I am working on a project that involves recording from a mic on a raspberry pi. for now i am getting this error while the program is running. python3: src/hostapi/alsa/pa_linux_alsa.c:3641: PaAlsaStreamComponent_BeginPolling: Assertion `ret == self->nfds' failed. Aborted while searching for ways to fix this, i figured out the file pa_linux_alsa.c belongs to port audio. please refer to the following links. modified pa_linux_alsa.c i think how to install port audio download link first link is