- EXEs created for Windows and executables for Linux in the Executables folder
-
Connection with VLC
-
Remote commands fully functional
-
Speech Recognition through Google Speech API (requires internet connectivity)
-
Support for noise adjustment
-
Click and run executables for Windows and Linux
-
Executables for Windows tested on Windows 10 and Windows 11
-
Executables for Linux tested on Ubuntu 20.04 LTS, Ubuntu 22.03 LTS and Kali Linux 23.2
-
Source tested on Python 3.10.0 (Should work with Python 3.8+) on Windows 10 Pro 22H2
-
Source tested on Python 3.11.6 on Windows 10 Pro 22H2 (Build: 19045.3570)
-
Source tested on Python 3.8.5 on Ubuntu 20.04 LTS
-
Source tested on MacOS 13
- Executables for Mac to be released in upcoming month.
- Improved speech recognition commands with wider vocabulary
- Task scheduling capability integrated into the setup to automatically launch the script with VLC. (Focused for Windows machines)
Download the latest release from Releases
Current latest release: v1.0
- Open VLC Media Player
- Click Tools on Menu Bar
- Click on Preferences
- On the bottom left of popup window, under 'show settings' click on All
- In the left menu expand 'Interfaces' and click on Main Interfaces
- IMPORTANT: In main interfaces, checkmark on 'Telnet'
- Expand 'Main Interfaces' on the left pane and click on 'Lua'
- On the right pane configure 'Lua Telnet'
- Lua Interface:
dummy
- Host:
localhost
or127.0.0.1
for same computer or set remote IP - Port:
4212
is default, you can leave it as is or configure any other port if required - Password: Set your password
- Lua Interface:
- Click on Save
- Restart VLC Media Player
- Open VLC Media Player
- Click on VLC Media Player on menu bar to open the context menu and click on settings OR Press
Command + ,
- On the bottom left of popup window click on "Show All"
- In the left menu expand 'Interface' and click on Main Interfaces
- IMPORTANT: In main interfaces, checkmark on 'Telnet'
- Expand 'Main Interfaces' on the left pane and click on 'Lua'
- On the right pane configure 'Lua Telnet'
- Lua Interface:
dummy
- Host:
localhost
or127.0.0.1
for same computer or set remote IP - Port:
4212
is default, you can leave it as is or configure any other port if required - Password: Set your password
- Lua Interface:
- Click on Save
- Restart VLC Media Player
-
Put the
Setup.exe
andSpeakToVLC.exe
files in your movies directory for easy access to run them while watching movies. -
Double click to run
Setup.exe
(Microsoft Defender may block this file because it generates a simple plain text configuration file which the AI engine understands to be some malicious remote scripts but in real is only the configuration for your application to use). If blocked by Microsoft Defender then you need to make an exclusion forSetup.exe
in Microsoft Defender. It's a false positive. VirusTotal scan results -
Go through the setup process:
- Host: Set host or leave empty for default
- Port: Set port or leave empty for default
- Noise adjustment: Set your noise adjustment preference during voice command or leave empty for default
- Password: Set your VLC Telnet interface password that you set in the above section
- You'll get a
config.json
file in the same folder where you ran Setup from. This file contains the connection information for the voice command and VLC. It should always be in the same place asSpeakToVLC.exe
.
- Play your favorite movie in VLC
- Double-click to run
SpeakToVLC.exe
. VirusTotal scan results - Enjoy ^_____^
- If any errors are encountered then refer to troubleshooting.txt or create an issue
- Put the
Setup
andSpeakToVLC
files in your movies directory for easy access to run them while watching movies. - Right click in the folder and
Open Terminal
. - Type
./Setup
and press Enter. VirusTotal scan results - Go through the setup process:
- Host: Set host or leave empty for default
- Port: Set port or leave empty for default
- Noise adjustment: Set your noise adjustment preference during voice command or leave empty for default
- Password: Set your VLC Telnet interface password that you set in the above section
- You'll get a
config.json
file in the same folder where you ran Setup from. This file contains the connection information for the voice command and VLC. It should always be in the same place asSpeakToVLC.exe
.
- Play your favorite movie in VLC
- Type
./SpeakToVLC
in the terminal and press Enter. VirusTotal scan results
Note: You may get output like below and this is totally normal because of the everlasting issue of audio devices and linux.
ALSA lib pcm_dsnoop.c:566:(snd_pcm_dsnoop_open) unable to open slave
ALSA lib pcm_dmix.c:999:(snd_pcm_dmix_open) unable to open slave
ALSA lib pcm.c:2666:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.rear
- Enjoy ^_____^
- If any errors are encountered then refer to
troubleshooting.txt
or create an issue
- Install Python >= 3.8 and < 3.12 if not already installed. IMPORTANT: Choose to install pip along with the installation.
-
- Windows: Double click to run
req.bat
- Linux/MacOS: Open terminal in current directory and type
chmod u+x req.sh
then./req.sh
to install all requirements from requirements.txt
- Windows: Double click to run
- Note: Run the
req.bat
as Administrator on Windows if you have Python installed inC:\Program Files\
. Similarly, trysudo
mode for *nix/MacOS - Internet connectivity for speech recognition
- Python 3.8+
cryptography
librarytelnetlib3
moduleSpeechRecognition
modulepyaudio
module- Windows: It'll install automatically with step 2.
- Debian/Ubuntu:
sudo apt-get install -y portaudio19-dev
sudo apt-get install python-pyaudio python3-pyaudio
- Redhat:
sudo dnf install portaudio-devel redhat-rpm-config
sudo pip3 install pyaudio
- If you encounter any error then try:
sudo dnf install python-pyaudio
- If you encounter any error then try:
- MacOS:
brew install portaudio
pip3 install pyaudio
- Go to scripts directory
- Run
setup.py
- Set host, port and password which were set in VLC media player in previous step
config.json
will be generated
- Launch VLC media player or play some media in VLC
- Run
speaktovlc.py
- You'll see the
VLC>
prompt to issue commands. (List of commands available in commands.txt)
play
- To play media
pause
/hold
- To pause playback
stop
- To stop playback
fullscreen
- Enter/Exit full screen
shutdown
- Exit VLC
increase volume
- Increase volume by 10%
decrease volume
- Decrease volume by 10%
stop listening
- Turns off voice command and closes SpeakToVLC
faster
- Faster playback by 0.5x
slower
- Slower playback by 0.5x
normal
- Normal playback
Other simple commands listed in commands.txt also work. Complex to speak commands like atrack
(for changing audio track) will be broken down into simple commands to implement their functionality in upcoming releases.
This might address some errors you could encounter which aren't mentioned below
In the event of crash a connection.log
file will be created in the directory from where the application was launched. Check it's contents and look below
Prompt:
Windows: ERROR __main__ [WinError 1225] The remote computer refused the network connection
Linux: ERROR __main__ [Errno 111] Connect call failed ('127.0.0.1', 4212)
Possible cause(s): The IP Address of the host machine OR/AND port is incorrect OR/AND VLC Media Player is not running.
Fix:
(i) Delete config.json
(ii) Run Setup.exe
/Setup
and generate a new config.json
(iii) Additionally you can open config.json
in text editor and verify the correct details
Common possible issues and fixes are listed in troubleshooting.txt
Prompt: ERROR __main__ [Errno 2] No such file or directory: 'config.json'
Possible cause: You executed SpeakToVLC.exe
/SpeakToVLC
before Setup.exe
/Setup
hence, config.json
doesn't exist yet.
Fix: Run Setup.exe
/Setup
and generate new config.json
before running SpeakToVLC.exe
/SpeakToVLC
Prompt: ERROR __main__ Expecting value: line 1 column 1 (char 0)
Possible cause: The config.json
file is empty.
Fix: Run Setup.exe
/Setup
and generate new config.json
with correct details. Additionally, you can verify using a text editor that correct details are saved.
Fix: Run brew install flac
in terminal to install flac