awesome app to read text from the clipboard when you press the insert key
View the Project on GitHub wisehackermonkey/ultimate-tts-reader
by oran collins
github.com/wisehackermonkey
oranbusiness@gmail.com
20200415
Prebuilt windows binaries are avaiable under releases
git clone https://github.com/wisehackermonkey/ultimate-tts-reader.git
cd ultimate-tts-reader
pip install -r requirements.txt
python ./main.py
copy something to the clipboard
press 'insert' on the keyboard
the computer should read the text to you!
>pip install pyinstaller
cd /path/to/project
pyinstaller --hidden-import=pyttsx3.drivers --hidden-import=pyttsx3.drivers.sapi5 --noconsole --onefile ultimate-tts-reader.py
pyinstaller --noconsole --hidden-import=pyttsx3.drivers --hidden-import=pyttsx3.drivers.sapi5 --specpath ${PWD}/builds --distpath ${PWD}/builds/dist --workpath ${PWD}/builds/build --onefile ultimate-tts-reader.py
add move to windows folder
NOTE mv -force overwrites the exe (and is a powershell command)
> pyinstaller --noconsole --hidden-import=pyttsx3.drivers --hidden-import=pyttsx3.drivers.sapi5 --specpath ${PWD}/builds --distpath ${PWD}/builds/dist --workpath ${PWD}/builds/build --onefile ultimate-tts-reader.py ; mv -force ${PWD}/builds/dist/ultimate-tts-reader.exe ${PWD}/windows/ultimate-tts-reader.exe
> pyinstaller --noconsole --hidden-import=pyttsx3.drivers --hidden-import=pyttsx3.drivers.sapi5 --specpath ${PWD}/builds --distpath ${PWD}/builds/dist --workpath ${PWD}/builds/build --onefile ultimate-tts-reader.py ; mv -force ${PWD}/builds/dist/ultimate-tts-reader.exe ${PWD}/windows/ultimate-tts-reader.exe ; $date = Get-Date -Format "yyyyMMdd"; Compress-Archive -force -Path ${PWD}/windows/ultimate-tts-reader.exe -DestinationPath ${PWD}/windows/ultimate-tts-reader_windows_${date}.zip
### Auto update setup
pyupdater init
copy key ‘keypack.pyu’
pyupdater keys -i
pyupdater settings –plugin scp
### Auto update build and push
```bash
on remote server
(TESTING)
sudo docker run --rm -it -p 7777:8080 --name simple -v /root/version-ultimate-tts-reader:/var/www:ro trinitronx/python-simplehttpserver
(deployment)
sudo docker run -d --restart=always -p 7777:8080 --name static-serve -v /root/version-ultimate-tts-reader:/var/www:ro trinitronx/python-simplehttpserver
pyupdater build --onefile --hidden-import="pkg_resources.py2_warn" --app-version=1.4.0 ultimate-tts-reader.py
pyupdater build --onefile --hidden-import="pypiwin32" --app-version=1.4.0 ultimate-tts-reader.py
pyupdater build --onefile --hidden-import="win32api" --hidden-import="pkg_resources.py2_warn" --app-version=1.4.0 ultimate-tts-reader.py
pyupdater pkg --process
pyupdater pkg --sign
## Improvements
- start minimized
- pause key/button
- fix quit on escape
- voice
- slow down the voice
- change voice
- catch KeyboardInterrupt graceful shutdown
- ~~Copy selected text to clipboard or copy selected text and read it~~
- ~~dependence injection
- ~~gui mvp
- ~~change stop use TK to quit
- ~~change stop key to fn + insert
- auto-update
- add zip to releases page github
- ~~increase size of window~~
- ~~start minimized~~~
## Links
tts https://pyttsx3.readthedocs.io/en/latest/engine.html#examples
keyboard https://pynput.readthedocs.io/en/latest/keyboard.html
posible solution to pause key https://github.com/nateshmbhat/pyttsx3/issues/35
Tkinter gui https://docs.python.org/3/library/tkinter.html
Pyinstaller https://pyinstaller.readthedocs.io/en/stable/usage.html
pyinstaller fix output file destination Python: how to specify output folders in Pyinstaller .spec file https://stackoverflow.com/questions/37319911/python-how-to-specify-output-folders-in-pyinstaller-spec-file
pyinstaller fix pyttsx3 not found error
pyinstaller –hidden-import=pyttsx3.drivers song_dl.py
https://stackoverflow.com/questions/58133083/modulenotfounderror-no-module-named-pyttsx3-drivers-file-compiled-with-pyins
# Scratch pad
pyinstaller –onefile –hidden-import=”pkg_resources.py2_warn” ultimate-tts-reader.py
pyinstaller –console –hidden-import=pyttsx3.drivers –hidden-import=”pkg_resources.py2_warn” –hidden-import=pyttsx3.drivers.sapi5 –onefile ultimate-tts-reader.py
pyinstaller –console –hidden-import=win32api –hidden-import=pyttsx3.drivers –hidden-import=”pkg_resources.py2_warn” –hidden-import=pyttsx3.drivers.sapi5 –onefile ultimate-tts-reader.py
22885 WARNING: library coredll required via ctypes not found
23100 INFO: Including run-time hook ‘pyi_rth_pkgres.py’
23106 INFO: Including run-time hook ‘pyi_rth_win32comgenpy.py’
```
counter skript