-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Making more error resilient and adding readme info
- Loading branch information
Showing
4 changed files
with
69 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,66 @@ | ||
# Autohotkey ChatGPT | ||
|
||
## Build Source Code | ||
Use your voice to control Windows 📢 | ||
|
||
| You say | Windows does | | ||
| -------------------------- | ------------------------------------------------ | | ||
| Open Firefox | Opens Firefox | | ||
| Search for cupcake recipes | Opens browser and searches for 'Cupcake Recipes' | | ||
| Tell me the first 20 digits of Pi | Shows a window with the 20 first digits of Pi | | ||
|
||
⚠ WARNING ⚠ This is an experimental application. ChatGPT can end up doing random stuff. So please use with caution! | ||
|
||
## Install | ||
|
||
- Download and install AutoHotKey V1 from [autohotkey.com](https://www.autohotkey.com/) | ||
- Download `AutoHotKey-ChatGPT.zip` from the [Releases](https://github.com/mxro/autohotkey-chatgpt-voice/releases) for the latest release. | ||
- Extract `AutoHotKey-ChatGPT.zip` | ||
- Edit `config.json` from the extracted files. Provide your [Open API Key](https://www.howtogeek.com/885918/how-to-get-an-openai-api-key/) for the property `OpenapiKey`. | ||
|
||
```json | ||
{ | ||
"OpenapiKey": "", | ||
"AutoHotKeyExec": ".\\bin\\autohotkey-1.1.37.01\\AutoHotkeyU64.exe" | ||
} | ||
``` | ||
|
||
## Usage | ||
|
||
- Double click on `watch.ahk` from the extracted files | ||
- Press F8 | ||
- Speak into your microphone what you would like to do | ||
- Press F8 | ||
- Wait for Open AI to do its magic | ||
|
||
## Customise | ||
|
||
Among the extracted files, there is a `prompt.txt`. You can edit this to customise it to yor own needs. | ||
|
||
For instance, the current prompt file defaults to using the [DuckDuckGo](https://duckduckgo.com/) search engine. You can change this easily to any search engine you like, by modifying the following line in `prompt.txt`: | ||
|
||
``` | ||
Unless otherwise specified, assume: | ||
... | ||
- the default search engine is DuckDuckGo | ||
... | ||
``` | ||
|
||
## Prior Art | ||
|
||
- [ChatGPT-AutoHotkey-Utility](https://github.com/kdalanon/ChatGPT-AutoHotkey-Utility): Uses AutoHotKey to perform a number of actions, such as translate | ||
|
||
## Develop | ||
|
||
### Build Source Code | ||
|
||
`task build` | ||
|
||
## Package Executable | ||
### Package Executable | ||
|
||
`task package` | ||
|
||
## Run Locally | ||
### Run Locally | ||
|
||
``` | ||
go run ./cmd/whisper-autohotkey/. | ||
``` | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
Run, firefox.exe "https://duckduckgo.com/?q=how`%20to`%20create`%20zip`%20file`%20with`%20github`%20actions" | ||
Run, https://www.pexels.com/search/beautiful`%20flowers/ | ||
return |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,16 @@ | ||
Capslock::Esc | ||
|
||
F8:: | ||
Run %A_WorkingDir%\bin\fmedia-1.31-windows-x64\fmedia\fmedia.exe --record --out=rec.mp3 --globcmd=listen,, Hide | ||
NotRecording := !NotRecording | ||
If NotRecording | ||
{ | ||
Run %A_WorkingDir%\bin\fmedia-1.31-windows-x64\fmedia\fmedia.exe --record --overwrite --out=rec.mp3 --globcmd=listen,, Hide | ||
} | ||
Else | ||
{ | ||
Run %A_WorkingDir%\bin\fmedia-1.31-windows-x64\fmedia\fmedia.exe --globcmd=stop,, Hide | ||
Sleep, 100 | ||
Run %A_WorkingDir%\bin\whisper-autohotkey\whisper-autohotkey.exe,, Hide | ||
} | ||
return | ||
|
||
F9:: | ||
Run %A_WorkingDir%\bin\fmedia-1.31-windows-x64\fmedia\fmedia.exe --globcmd=stop,, Hide | ||
Sleep, 100 | ||
Run %A_WorkingDir%\bin\whisper-autohotkey\whisper-autohotkey.exe,, Hide | ||
return |