HAL is a voice-enabled version of chatGPT that can run on command-line terminals, and multilingual support.
Note: the Azure Speech SDK for go only support linux, so this project only run on linux environment. The Speech SDK does not support OpenSSL 3.0, which is the default in Ubuntu 22.04. On Ubuntu 22.04 only, install the latest libssl1.1 either as a binary package, or by compiling it from sources. Read more about this.
✅ Get an OpenAI API key
✅ Get an Azure Speech key
require: go >= 1.18
git clone https://github.com/neotse/hal.git
cd hal
chmod +x install.sh
./install.sh
just run it, and following the guide to configure.
hal
If you want to reconfigure, run below command:
hal --init
Or, you can see the help:
hal --help
Try to say Harold to Activate, and stopword (configured above) to Deactivate (or automatically deactivated if there is no speech for a while).
just talk to HAL
in your language (configured above)
First, you need generate a keyword model file from Azure, and download the model file. Then, use hal keyword
command to configure it.
Usage of keyword:
-keyword string
set the keyword for activate (case insensitive), path and lang must be set at same time.
-lang string
set the language of keyword. (see https://learn.microsoft.com/en-us/azure/cognitive-services/speech-service/language-support?tabs=stt)
-path string
set the path of model file of keyword.
-show
show the current config of keyword for activate.
Most of the time, conversations have context. Therefore, retaining some context can improve the quality of chatGPT's responses. In addition, OpenAI also provides system
type messages to reinforce chatGPT's attention to improve the quality of responses. Therefore, here, sessions are used to retain this information. You can manage sessions, including listing sessions, selecting sessions, editing sessions, and creating sessions. Session management can be done in two ways:
use hal session
command to configure sessions.
Usage of session:
-config
config the 'session' for talk.
-create
create the 'session' for talk.
-delete
delete the 'session' for talk.
-list
list current chatgpt sessions.
-select
select the 'session' for start to talk. If not set, it will select the session recently used.
When running, you can say the keyword (or similar in meaning) to invoke corresponding the action.
action | keyword | for example (other languages are also supported) |
---|---|---|
list | list sessions | please list the sessions |
select | select session | I want to select a session |
delete | delete session | delete a session |
create | create session | help me create a session |
config | configure session | configure the session |