Python Speech Recognition to Max MSP
Автор: gmazel
Загружено: 2025-02-01
Просмотров: 282
Описание:
This Python program runs as a speech recognition server on your Mac.It captures your voice through a mic, recognizes text, and then sends the recognized text to Max MSP followed by a Bang. Useful for dictating program control messages with just your voice!Think about using it for children's reading games, or music theory flash cards, or anything creative!I have included all the necessary files to make this solution work. The LaunchSpeech_to_Max.sh script file sets your environment and launches python3 with the source code provided. I have tested it on a MAC running MAX 8 and Python3. Max is listening on port 54321 using the udpreceive object. Thanks to PythonOSC, the messaging is fairly trivial to process in Python.
All the Python source code files and the Max patch is available for free on my new Patreon:
/ speech-to-text-120640451
Usage:
Save the files Speech_to_text_in_Max.maxpat, LaunchSpeech_to_Max.sh and speech_to_text_in_Max5_Silence_Detection.py in a directory on your local machine.
Open speech_to_text_in_Max5_Silence_Detection.py with any text editor and
change the line with MIC_INDEX = 5 # Replace with the index of your desired microphone
If you want to see the list of microphones on your system try adding:
print("\n".join(f"{i}: {name}" for i, name in enumerate(sr.Microphone.list_microphone_names()))) in the .py file
Повторяем попытку...
Доступные форматы для скачивания:
Скачать видео
-
Информация по загрузке: