top of page

EDCoPilot voice integration with Open AI ChatGPT

Updated: Nov 8, 2023

You can now hold a voice conversation with EDCoPilot integrated with ChatGPT and VoiceAttack. This all integrates so it appears as if it you are chatting with EDCoPilot. You can ask it anything !

EDCoPilot will speak the response, and print its reply on the Voice Log panel (see image), as it does with any regular Voice Attack command you give it

In the above Voice Log output, the Request> lines are my spoken input, followed by EDCoPilot / ChatGPT's reply.

Note: if you are in conversation with it, you can still issue the standard Voice Attack commands which will be processed as per usual.


What you need

- Voice Attack (the paid version, demo version will not work)

- The OpenAI-Voice Attack Plug-In (free to download and use)

- An Open AI account with API credits available,

You have to prepay for API credits. As an indicator on cost, 300 interactions with ChatGPT during testing over 3 days cost me $0.44 (44 cents)


Setup

This assumes you have installed Voice Attack, and imported the EDCoPilot VAP as per the Installation Instructions document in your EDCoPilot / docs folder.

  1. Download and install the OpenAI-Voice Attack Plug-In from here : https://github.com/SemlerPDX/OpenAI-VoiceAttack-Plugin#readme

    1. Note, you do not need to keep the AVCS or OpenAI Voice Attack profiles loaded in Voice Attack. All commands required are contained in the EDCoPilot profile. Only the base Voice Attack plug-in is required.

  2. Create an OpenAI account, and load with API credits : https://openai.com/

  3. Generate an OpenAI API key (in your account section on the OpenAI site)

  4. Use the VoiceCommand "Open AI key menu" which will pop up a panel where you can paste the API key and save.

Usage

  1. Start EDCoPilot as per normal

  2. Issue command "Hey CoPilot" or "Chat query" (instructions to customise this phrase are later in the article)

  3. EDCoPilot / OpenAI plug-in responds with a "Yes Commander?" response

  4. Ask your question. After a 1-2 second pause, if all is working OK, you will hear a thinking sound, while ChatGPT processes and replies to your request.

  5. EDCoPilot will read the ChatGPT response, breaking the response into chunks if necessary.

    1. If there is a "There is more" message, you can use voice command "Tell Me More" to have the next paragraph read, or "Display Remaining" to simply display the rest of the text on the Voice Log. "There is more" responses are typically given if you have asked for a list ... eg. "give me 5 facts about the planet Mars"

    2. If paragraphs are too long, EDCoPilot will read the first few lines followed by a "more follows" message. EDCoPilot will read that line, then proceed automatically to read the next block of text, and so on.

  6. Once EDCoPilot has finished reading the response, you have a few seconds to reply / ask the next question.

    1. If you dont respond in a few seconds, the OpenAI plugin will stop listening. You will get an INFO message on the Voice Log that the conversation is sleeping. You can resume the conversation by issuing another "chat query" command

    2. If you do respond, OpenAI will process your verbal response, and repeat process from step 4

  7. You can use voice command "stop chatting" to close a conversation, or "reset chat / stop all commands" if the thinking sound loops and no reply (an indication something has gone wrong such as OpenAI too busy, or just taking too long to respond)


Customising the Voice Attack phrases:

  1. All of the Voice Attack commands used for OpenAI chat are tokenised, with token definitions defined in a master config file in EDCoPilot \ working \ EDCoPilot.VoiceCommands.ini.

    1. Do not make changes to this file, as this will be overwritten by updates in new releases.

  2. Users can override the definition in the master config file, by copying lines into the file EDCoPilot \ working \ EDCoPilot.VoiceCommandsCustom.ini and modifying the trigger phrase portion:

    1. Edit the EDCoPilot.VoiceCommandsCustom.ini file and add these line:

[OpenAI-Interface]

OPENAIQUERY = Initiate / continue an Open AI conversation|Hey CoPilot; chat query; chatbot [entry; query]

OPENAIKEYMENU = Open the key menu to enter your Open AI API key (setup)|Open AI key menu

OPENAISTOPCHAT = Stop the current OpenAI ChatGPT conversation|Stop chatting; stop conversations|crew

OPENAIREMAINING = Display remaining ChatGPT response text if "there is more" in the voice log (but do not speak the text)|display remaining

OPENAITELLMORE = Speak and display the next few sentences of ChatGPT response (if "there is more")|Tell me more

OPENAICANCEL = Cancel a thinking loop (Note: also stops all VA commands and ends the conversation)|Reset chat


b. Change the last portion of each line after the | to the voice trigger you want. Example: to use "Hey Holly" instead of "Hey CoPilot" change the OPENAIQUERY line to say OPENAIQUERY = Initiate / continue an Open AI conversation|Hey Holly; chat query; chatbot [entry; query]

c. Save the file, and either restart EDCoPilot, or issue the voice command "Refresh CoPilot" to reload the variables. Your custom voice command should now be recognised.







332 views0 comments

Recent Posts

See All
bottom of page