Когда я пытаюсь установить пакет PyAudio в Python версии 3.13.0. возникает следующая ошибка:
Как это исправить и почему возникает эта ошибка?
Note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for PyAudio
Failed to build PyAudio
[notice] A new release of pip is available: 24.2 -\> 24.3.1
[notice] To update, run: python.exe -m pip install --upgrade pip
ERROR: ERROR: Failed to build installable wheels for some pyproject.toml based projects (PyAudio)
Я попробовал несколько способов исправить эту ошибку, установив несколько пакетов.
Исходный код:
import pyttsx3
import speech_recognition as sr
engine = pyttsx3.init()
voices = engine.getProperty('voices') #getting details of current voice
# for voice in voices:
engine.setProperty('voice', voices) # setting up volume level between 0 and 1
engine.setProperty('rate', 130)
def speak(command):
engine.say(command)
engine.runAndWait()
# obtain audio from the microphone
r = sr.Recognizer()
with sr.Microphone() as source:
print("Say something!")
audio = r.listen(source)
# recognize speech using Google Speech Recognition
try:
print("Google Speech Recognition thinks you said " + r.recognize_google(audio))
except sr.UnknownValueError:
print("Google Speech Recognition could not understand audio")
except sr.RequestError as e:
print("Could not request results from Google Speech Recognition service; {0}".format(e))
# speak("Hello bro can I help you with your query?")
Подробнее здесь: https://stackoverflow.com/questions/791 ... ot-working
Создание голосового помощника, такого как Jarvis, с использованием Python, но PyAudio не работает: «ОШИБКА: не удалось с ⇐ Python
-
- Похожие темы
- Ответы
- Просмотры
- Последнее сообщение