Thanks to visit codestin.com
Credit goes to github.com

Skip to content
This repository was archived by the owner on Mar 2, 2021. It is now read-only.

Control Blender with Windows Speech Recognition.

Notifications You must be signed in to change notification settings

pekkavaa/voicecontrol-prototype

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Blender Voice Control Prototype

Control Blender with Windows Speech Recognition.

This addon sends simulated key presses to the Blender window when a voice control phrase is heard. Phrases are automatically read from user keybindings.

This is a prototype quality addon and meant as a base for further research. It is not supported and issues will be closed.

Installation

  1. Install the voicecontrol-prototype addon.
  2. Install its pywin32 dependency.

1. The addon

Use the preferences dialog to install like with any addon.

2. pywin32

You need to install the pywin32 package to run this addon.

Installing pywin32 into addon dir

A Python "wheel" package is bundled in external/ for convenience. Install it to voicecontrol-prototype/deps/ so that the addon finds it.

cd voicecontrol-prototype
python -m pip install external/pywin32-300-cp37-cp37m-win_amd64.whl --prefix deps

This makes it easy to remove the addon and it's dependencies.

For example for Blender 2.91:

cd %APPDATA%\Blender Foundation\Blender\2.91\scripts\addons\voicecontrol-prototype
"C:\Program Files\Blender Foundation\Blender 2.91\2.91\python\bin\python.exe" -m pip install external/pywin32-300-cp37-cp37m-win_amd64.whl --prefix deps

Then restart Blender.

How it works

This addon reads Blender's keymaps and listens to their names. For example, saying "New File" will be mapped to CTRL+N. There are also custom commands added for convenience. See get_hardcoded_phrases() in __init__.py.

You should see the Speech Recognition window pop up when the addon loads. You must activate speech recognition by clicking the round button.

Speech recognition's "listening" panel

Speech Recognition is active.

No external software is needed since Windows Speech Recognition COM objects can be used via Python (see speech.py).

Limitations

  • Not all keys are mapped into Windows virtual VK_* codes so many commands simply won't work.
  • Speech recognition only works on the system language. This can't be changed.
  • Speech recognition is a bit slow.
  • No context is taken into account when sending the key presses.
  • Many mappings have the same name but they overlap.
  • Windows only.

Blender speech recognition related links

About

Control Blender with Windows Speech Recognition.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages