savbell / whisper-writer

💬📝 A small dictation app using OpenAI's Whisper speech recognition model.
GNU General Public License v3.0
244 stars 40 forks source link

How to re - open, after restarting computer #54

Open Kenljs opened 4 weeks ago

Kenljs commented 4 weeks ago

Thank you for the work you put into this!

I was able to get this functioning so that control shift space started the transcription. However after restarting my computer I don't know how to get it back up and running again.

I'm sorry, but I know little when it comes to code, and I used chat GPT to help me get it installed.

Kenljs commented 4 weeks ago

I did try and look online for instructions, or ask GPT but couldnt resolve my issue.

Kenljs commented 4 weeks ago

This has been resolved. Thank you!

Thanks to handy-dandy GPT I found an easy way to relaunch after Opening

I created a text file on my desktop and put this code into it, then I changed the file extension to .bat to change the file type

For any novices who sees this in the future, you need to change

C:\Windows\System32\whisper-writer

to wherever whisper-writer is located on your computer.

@echo off
:: Check if the script is running as administrator
openfiles >nul 2>&1
if %errorlevel% neq 0 (
    echo Requesting administrative privileges...
    powershell -Command "Start-Process cmd -ArgumentList '/c %~dp0%~nx0' -Verb runAs"
    exit /b
)
:: Your original script starts here
cd C:\Windows\System32\whisper-writer
call venv\Scripts\activate
python run.py
anaxian commented 3 weeks ago

I dont think you need admin privileges

Kenljs commented 3 weeks ago

Huh... For some reason it wouldn't start without them initially. but I just removed that section, and now it is working. Thanks.