pyaudio

Using Python to playback mic input to PC in real-time

泄露秘密 提交于 2021-01-07 02:48:02
问题 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. So: Is there a way to eradicate that latency with

Using Python to playback mic input to PC in real-time

邮差的信 提交于 2021-01-07 02:46: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. So: Is there a way to eradicate that latency with

SpeechRecognition producing OSError: No Default Input Device Available

大兔子大兔子 提交于 2021-01-04 07:17:57
问题 This: import speech_recognition as sr r = sr.Recognizer() with sr.Microphone() as source: print("Speak Anything :") audio = r.listen(source) try: text = r.recognize_google(audio) print("You said : {}".format(text)) except: print("Sorry could not recognize what you said") Producing this: Traceback (most recent call last): File "magic.py", line 5, in <module> with sr.Microphone() as source: File "/home/myPorfile/anaconda3/envs/customEnv/lib/python3.6/site-packages/speech_recognition/__init__.py

SpeechRecognition producing OSError: No Default Input Device Available

我只是一个虾纸丫 提交于 2021-01-04 07:17:02
问题 This: import speech_recognition as sr r = sr.Recognizer() with sr.Microphone() as source: print("Speak Anything :") audio = r.listen(source) try: text = r.recognize_google(audio) print("You said : {}".format(text)) except: print("Sorry could not recognize what you said") Producing this: Traceback (most recent call last): File "magic.py", line 5, in <module> with sr.Microphone() as source: File "/home/myPorfile/anaconda3/envs/customEnv/lib/python3.6/site-packages/speech_recognition/__init__.py

SpeechRecognition producing OSError: No Default Input Device Available

跟風遠走 提交于 2021-01-04 07:16:16
问题 This: import speech_recognition as sr r = sr.Recognizer() with sr.Microphone() as source: print("Speak Anything :") audio = r.listen(source) try: text = r.recognize_google(audio) print("You said : {}".format(text)) except: print("Sorry could not recognize what you said") Producing this: Traceback (most recent call last): File "magic.py", line 5, in <module> with sr.Microphone() as source: File "/home/myPorfile/anaconda3/envs/customEnv/lib/python3.6/site-packages/speech_recognition/__init__.py

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

Nondeterministic pyaudio/ALSA failure

北城余情 提交于 2020-12-13 03:17:48
问题 I test some vanilla python code making a sound, specifically the code from this other question. As I run that code from the command line a la python code.py , it issues this series of messages coming directly from ALSA. So far that's not unusual, as I understand it is ignoring some unavailable devices that are somehow present in the involved ALSA config files, and skipping on using jack after not finding it present: ALSA lib pcm_dmix.c:1089:(snd_pcm_dmix_open) unable to open slave ALSA lib

Python 语音识别

自作多情 提交于 2020-11-24 08:42:22
出品 | 悦动智能(公众号ID:aibbtcom) 遇到问题请文末留言 【悦动智能导读】 亚马逊 的 Alexa 的巨大成功已经证明:在不远的将来,实现一定程度上的语音支持将成为日常科技的基本要求。整合了语音识别的 Python 程序提供了其他技术无法比拟的交互性和可访问性。最重要的是,在 Python 程序中实现语音识别非常简单。通过本指南,你将学到: 语音识别的工作原理; PyPI 支持哪些软件包; 如何安装和使用 SpeechRecognition 软件包——一个功能全面且易于使用的 Python 语音识别库。 ▌ 语言识别工作原理概述 语音识别源于 20 世纪 50 年代早期在贝尔实验室所做的研究。早期语音识别系统仅能识别单个讲话者以及只有约十几个单词的词汇量。现代语音识别系统已经取得了很大进步,可以识别多个讲话者,并且拥有识别多种语言的庞大词汇表。 语音识别的首要部分当然是语音。通过麦克风,语音便从物理声音被转换为电信号,然后通过模数转换器转换为数据。一旦被数字化,就可适用若干种模型,将音频转录为文本。 大多数现代语音识别系统都依赖于隐马尔可夫模型(HMM)。其工作原理为:语音信号在非常短的时间尺度上(比如 10 毫秒)可被近似为静止过程,即一个其统计特性不随时间变化的过程。 许多现代语音识别系统会在 HMM 识别之前使用 神经网络