Sounds interesting

My blog and podcast

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

Introducing btgpt! Join the Beta

Post Status: btgpt Invite-Beta 1 now live!Thank you for your patience.

Welcome fellow BTSpeak users and anyone interested in the BTSpeak1 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. It runs in the unix shell, so works on both the basic and pro models, that is in traditional mode.

Btg can be run from the User Menu or in the shell, or a cut-down version called ask can be accessed right from within the BTSpeak editor.

This is a very rough demo of using ask from within the Nano editor. Speech is too fast and I’m losing my voice.

When in the full btg app, You braille in your question (prompt) and then btg reads out Chat GPT’s responses aloud, using the DECtalk synthesiser.

Here is a rough audio demo of a btg interaction. Apologies that the voice is a bit fast. New demos coming.

A future btg release is being explored that will also work with ESpeak, but, for now, btg is DECtalk only. I don’t want to release software that hasn’t had pretty thorough internal testing, but I also wanted to get the first release of btg, in to people’s hands, asap.

Btgpt is released as open source software, as is the chatGPT-shell-cli script that it is built around. .

Note that this first release is only being made available for beta testing, see requirements for testers later in this post. There is no automatic installer available at this stage.

Based on an Existing Chat GPT script

BTGPT is built around the open source 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 current 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 exa ctly what GPT output has been received and sent to the virtual screen. This could differ slightly from what you hear from the btg spoken output, because part of the self voicing capability involves reformatting 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 by the app.

Note: a future release may utilise the BTSpeak ‘view file’ facility, ensuring the entire response can be reviewed.

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. ‘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, or key appears to not be in the required format,
  • fine-tuned the wordings of the initial Chat GPT prompts for better BTSpeak aware responses.
  • Created a simple ask mode for asking a single question without using the full btg app.
  • so you can enter – 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 BTSpeak 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 found in in the OpenAI-key Help file found in your BTSpeak help menu.

This Open Ai key 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.
  • You can enter a shell by holding all nine keys down. Press dots 1-4 chord and it should speak the bash command prompt, including your current directory. To return to where you left off, type exit and enter.
  • Commands you might experiment with are: ‘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. I am, 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

If you are interested in trying the beta, already have an Open AI key, have it installed in the right location, and you believe you meet the beta tester requirements, you can proceed to the btg Beta Resources page containing full instructions on how to download and install the btg-beta1 btgpt package.

If you just want to preview the installation process, you can read the information on that page, and decide whether you feel comfortable performing the installation steps.

btg’s Origins and a bit About Me

I developed btgpt because I was really excited when I heard about the BTSpeak with accurate braille input and running on Linux. Even before I placed my order, I started researching Chat GPT options for the Linux shell and read about chatgpt-shell-cli. The first thing I did when my unit arrived was to install my key and try out the in-built Chat GPT app. Sadly, it wasn’t operational, so I downloaded chatgpt-shell-cli and started enhancing it to suit my needs and interests. What started out as a few tweaks, soon let to the original 460 lines of bash code increasing to around 1000 lines (including liberal comments).

That process, combined with my frustration with Chat GPT Plus’s web interface, got me really thinking about the kinds of features I’d like in a Chat GPT app, which is always at my fingertips. and so btgpt was born.

40 years ago I taught myself Unix (the father of Linux), regular expressions and loved the power and flexibility of the shell for directing and reformatting information. Unix seemed designed for accessibilitypersonalisation and so much about the unix philosophy. Then, In the very early 90s, my then partner and I ran a community-based internet access service, and most of my admin and use of the system was via my trusty Braille ‘n Speak and its terminal mode.

So, 30 years on, Linux is actually inside a device even smaller than the original Braille ‘n Speak, and I am using the same kinds of tools I used – way back then – developing ways to efficiently and effectively access information..

In the late 90s, when I worked for Royal Blind Society, I developed and ran Today’s News Now – a fully automated telephone service in New South Wales Australia providing access to the major daily newspapers and our talking book catalogue. This was somewhat like the News Line for the Blind service. It was built round DECtalk, so I became very familiar with its strengths – and all its foibles.

So, it was the fortuitous combination of all these factors, aligned with my background in voice user interface design, that led me on this journey to start exploring just what might be possible with this fledgling pocket-sized contemporary take on the venerable Braille ‘n Speak.

This is only btg beta 1; I have a lot of ideas to explore and features I think would be of value. It’s taken a lot of work to get btg to this point, but I think it is now pretty solid and that the code is in reasonably good shape for creative experiments and expansions down the track.

Please let me know how you find it and what things you might like me to consider for future versions.

Enjoy

Tim Noonan tim@timnoonan.com.au


  1. 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. 

btgpt Beta Resources

Welcome to btgpt beta Thank you for your interest in testing the btg beta on your BTSpeak! I hope you will find the software functional and enjoyable to use. I invite your feedback on any aspect of the experience, from communications and documentation, downloading and installing, through to configuring and using btg. Important note before… Continue Reading btgpt Beta Resources

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.