Sounds interesting

My blog and podcast

Introducing btgpt – a Self-Voicing Chat GPT app for the BTSpeak

Introducing btgpt! Join the Beta

Welcome fellow BTSpeak users and anyone interested in the BTSpeak from Blazie Technologies.

I’m very excited to tell you about an up-coming custom app I’m developing for the BTSpeak. It’s called btgpt (or, btg) for short. Btg is a self-voicing chat GPT app designed and customised for the BTSpeak device. You braille in your questions and then btg reads out Chat GPT’s responses aloud, using the DECtalk synthesiser. A future btg release is being considered that will also work with ESpeak, but, for now, btg is DECtalk only.

Note that this first release is only being made available for beta testing, see requirements for testers later in this post.

Based on an Existing Chat GPT script

BTGPT is built around the public domain chatGPT-shell-cli bash script, developed by 0xacx

“A simple, lightweight shell script to use OpenAI’s chatGPT and DALL-E from the terminal without installing python or node.js. The script uses the official ChatGPT model gpt-3.5-turbo with the OpenAI API endpoint” Original chatGPT-shell-cli bash script Original chatGPT-shell-cli Readme file

My sincere thanks to 0xacx; without his extensive efforts in developing the original bash script – which handles all the GPT interaction code – , this enhanced self-voicing BTSpeak app would not have been possible.

Please note that I have endeavoured to keep all the original functionality of the chatGPT-shell-cli script available. It provides a variety of command-line options for specific functionality and non-interactive modes. Only some of these are self-voicing.

however, I have also put in a lot of work to make btg more intuitive and straight-forward to use, easier to configure and with the goal to support less technical users who want to benefit from Chat GPT.

So What Is BTG and How Does it Work?

btg allows you to braille in your questions (termed prompts) to the Chat GPT service and have the answers spoken aloud to you in a concise but structured format. It keeps track of your conversation history for the current btg session, so you don’t need to repeat yourself and Chat GPT can refer to your earlier information in its latest response to you.

For its primary operation, btg is self-voicing. this means that it does not need you to review the screen to hear GPT responses or other critical information or errors. However, should you wish to, you can always enter Review mode on the BTSpeak, to see exactly what has been sent to the virtual screen, as sometimes the self voicing feature reformats information for better reading aloud.

Some more advanced features available in the original script, do not currently self voice, but in these instances, review mode is always available.

Note: since the BTSpeak virtual tty screen has a limited number of lines, the BTSpeak review mode only shows text still present on the virtual screen. However, even if the GPT reply is longer than the number of lines on the virtual screen, it will be read out to you in full.

GNU Screen for advanced users

More advanced users may consider installing the GNU ‘screen’ utility. This keeps an extended copy buffer of output to the terminal, allowing you to scroll back to information no longer visible on the screen, or accessible to the BTSpeak review mode. While in the copy buffer you can copy text and append text to a virtual clipboard, and paste it elsewhere in the shell later.

‘Screen’ is not pre-installed on the BTSpeak at this time, so it will need to be installed with the apt package manager.

How does BTG differ from the Original Script?

In addition to self-voicing Chat GPT output,,the additions and enhancements I’ve made to 0xacx’s original Chat GPT script include:

  • Checked for open AI api keys in the /home/pi user’s home directory, compatible with BTSpeak Chat GPT key location guidelines
  • added a user configuration file so the script doesn’t need to be edited by the user . This file is optional, if the user is satisfied with the pre-set defaults.
    • Key=Value pairs to set preferred DECtalk voice name, rate, volume and pitch to be configured as well as a contrast voice name, and off-set pitch volume and rate values for voice font reading of various markdown elements such as headings and emphasis.
    • user can specify a range of values used for GPT interactions including the preferred GPT model, context size, initial Chat GPT prompts and more.
  • added self voicing for key errors like key not found
  • fine-tuned the wordings of the initial Chat GPT prompts for better BTSpeak aware responses.
  • Created a simple ask bash script so you can say “ask who is Deane Blazie And you hear the answer. You can also call this ask command from within Nano (the BTSpeak editor) and it will speak the first paragraph of the answer and then insert the full response into a Nano file, for reading or later editing.
  • wrote a markdown self-voicing renderer (currently very DECtalk centric). It supports voicing the following markdown elements in a clear and concise form.
    • announce link name
    • announce image alt text or title
    • announce bullet points and sub-points;
    • announce markdown to-do and done items,
    • announce headings and their level e.g., “H1: What is btg?”
    • differentiate block quote, text in single quotes and text in back tick “ quotes from regular text
    • DECtalk voice fonts for emphasis types including Bold, Italics plus Bold and Italics
  • added a ‘bang command’ feature (exclamation mark command) so a user can start the line with the exclamation mark immediately followed by a bash command , and it will be executed in a sub-shell and the results shown on screen. You are automatically returned to btg when the command finishes. For example typing ‘!ls -1’ would list the file names in the current directory, one per line, and return you to btg….
  • also supports ‘!sh’ (exclamation mark s h) to start a bash sub-shell. Type ‘exit’ to return to btg
  • for increased safety, added spelling out the command-line generated by the ‘command:’ GPT prefix command. When you prefix your prompt with ‘command:’ and ask a question about how to do something in linux, Chat GPT attempts to return a single command line to do the job. This is spelled out and you are asked if you wish to run the command or not. This is a feature offered in the original script, but I have worked to ensure the command line is spelt out fully, so you are clear what the proposed command line contains. This is an advanced feature for people with some shell experience!

Note: A future version of btg may disable this feature by default, but allow it to be activated via the configuration file.

Currently Only Available in Beta

I’ve put a lot of work into btg already, but there is lots more work still to be done. Although the BTSpeak is generally based on open source software, maintaining device stability is crucial for all users.

For now, to install btg you need to issue bash shell commands. If sufficient care is not taken when in bash, system stability can be compromised!

For that reason, to beta test this early release, you will strictly need to meet the following criteria:

Beta Tester Requirements:

  • you need to have reasonable technical ability and confidence in the general operation of your BTSpeak. This includes:
    • solid knowledge of computer braille and extended punctuation characters for entry of commands at the shell, such as ‘/’, ‘~’, ‘+’ ‘.’ Control characters, etc. Or, you need to have a QWERTY keyboard connected.
    • you need to be Comfortable with the VTSpeak review mode, including reviewing by line and letter.
  • You need to have already obtained an Open AI key from Open AI, the folks who created and provide Chat GPT. This key can be a free key, or a funded key.

Create an account and get a free API Key here

  • You need to have already successfully installed your key in a key file on your BTSpeak, as per the instructions in the Chat GPT Help file found on your B TSpeak unit.

This file should have the name
.openAI_key
or
.openAPI_key
and be saved in your home directory, which is at
/home/pi

Note! The btg app will not and can not operate unless a valid API key is found when it is run. .

  • Some familiarity with Unix/Linux/shel commands is desirable. Open an interactive shell on your BTSpeak and experiment with some basic non-destructive Linux commands.

    • For example: ‘ls’, ‘cd’, ‘mkdir’, ‘pwd’, and ‘ps’.
    • Use Review mode (chord r) to examine their output on screen.
  • Ability to follow installation instructions TO THE LETTER

  • Finally, you need to explicitly understand and acknowledge that issuing bash commands carries risks. Tim Noonan takes no responsibility for any possible problems or issues introduced by your installation or use of the btg app!

  • For now, understand that this app was primarily designed and tested with the DECtalk synthesiser. Tim Noonan makes no guarantees that future versions will support ESpeak or other TTS engines. We are, however, actively investigating ways to make the app more TTS agnostic, to support more users and their preferences – especially for users of non-English speech output.

Becoming a Beta Tester

Please email me Tim@timnoonan.com.au to request to become a beta user. Your email must Confirm the following:

  • I have an Open AI key and it is correctly installed on the BTSpeak;
  • I have Unix/linux experience or have spent some time in the BTSpeak bash shell, getting familiar with some basic Linux commands.
  • I acknowledge that I take full responsibility for my actions in installing and using btgpt.

I will then send you a link to the beta page and a password to access it.

That page will contain

  • the current version of the btgpt script
  • a default .btgpt.conf file
  • instructions on doing a minimal install of the script
  • instructions on a more complete install, so you can use Ask from within the editor

* notes on current features and limitations of the provided version.

The BTSpeak from Blazie Technologies is a Raspberry Pi-based Braille input, Speech output pocket computer, running Linux. It is the much-requested successor to the iconic Braille ‘n Speak Braille note-taker developed by Blazie Engineering in the late 1980s.

Updated for watch OS4 and Series 3 – Tim Noonan’s Apple Watch Accessibility with Voiceover Review

This is a live review; as I gain more experience with the new Watch hardware and watchOS 4 I’ll update the document. Last updated 6 December 2017 to include changes for watchOS 4.2 including real Siri voice support. Previously updated to include some LTE comments, additional notes on touch-screen sensitivity and responsiveness, and a section… Continue Reading Updated for watch OS4 and Series 3 – Tim Noonan’s Apple Watch Accessibility with Voiceover Review

Tick Tock Apple Watch 1S My Hopes and speculations of what is next

One Year In with my Apple Watch Originally written in April 2016. Updated 25 October 2016 following release of new Watch hardware and OS. Last year I wrote and progressively updated an extensive blog post on Apple Watch Accessibility with Voiceover which expands on some of the points I make here. I received my Apple… Continue Reading Tick Tock Apple Watch 1S My Hopes and speculations of what is next

Welcome to Sounds Interesting – my new Blog and Podcast

New Year, New Website, , New Blog. Hi I’m Tim Noonan and I’d like to welcome you to my new Blog and Podcast which I’m calling Sounds Interesting. As a blind person I’ve always had a great interest in sound and in voice, and I’ve been fortunate to be able to combine this interest in… Continue Reading Welcome to Sounds Interesting – my new Blog and Podcast

website by twpg

This website uses a Hackadelic PlugIn, Hackadelic SEO Table Of Contents 1.7.3.