Speech-based commands directly to your terminal
Remembering hundreds of terminal commands on various operating systems -> Use natural language (and your voice) to execute command line instructions!
-
pip install -r requirements.txt
- Get an OpenAI API key (and plug it in): <=$5 for a years amount the last I checked
-
python[3] main.py
- After initial prompt, speak your command (the system will find an available microphone if it exists). Alternatively type it after update 1
- Say 'yes' to confirm you are done speaking (stop word). Say 'radio' or 'redo' to reset the current command and restate it.
- After that, you will be asked to confirm whether or not you want to send the request to the OpenAI api.
- Then, the system display the received bash command asking if you would like it to be executed on your system (the result will be correct based on OS automatically - no need to specify)
- Lastly, the results from the execution will be displayed
- Allow for text inputs instead of just voice
- Customize reset and stop words
- Look into huggingface API calls (free) instead of OpenAI (~$5 a year)
- Allow for speaking instructions instead of text in terminal
- Enable forced execution
- Make an option for an infinite loop (until final ending word)
Saw Jensen Huang say English is the future programming language, so I thought it would be cool to enable speaking directly to your machine as though it is a person. Additionally, this could help those who are unfamiliar and want to learn shell commands, those who have conditions rendering it difficult/impossible to type, and the visually impaired (see update 4). Would love any help on it
MIT License. Copyright - Colin Wolfe, 2024