Speech

hns – privacy-focused speech-to-text CLI utility

I’ve reviewed quite a few tools that use deep-learning to train and deploy speech-to-text models. Software that I like include Bark, CoquiSTT, Piper, Speech Note, Tortoise TTS, and Whisper.

But what if you want to convert speech to text. Let’s look at a very simple tool that does just that. It’s called hns. The tool records your voice, transcribes it locally using faster-whisper, and copies the transcription to your clipboard.

This is free and open source software.

Installation

I evaluated hns with the Manjaro Linux distribution.

The project recommends installing hns with uv, a fast Python package and project manager written in Rust.

uv is not present on my test machine. Let’s install it with Pamac (Manjaro’s GUI package manager).

Install uv

Now I can install hns with uv.

Install hns

In Operation

On first run, hns starts recording. When you press Enter, recording stops. hns then downloads the base Whisper model from the internet. Only on a model’s first run is the internet accessed. All transcriptions are then only performed locally.

On my test system, processing audio wasn’t successful as I need to install an additional program.

No copy/paste mechanism

As I’m running Wayland, I installed wl-clipboard (again using Pamac).

Installing wl-clipboard

Here’s example output. I read out an extract of this web page. Transcription is extremely fast!

Example output

The text is automatically copied to the clipboard so that it can be pasted into any application. The developer suggests you can paste it into an AI assistant and then use that to produce structured output. Equally, you can paste the output into an email client, instant messaging client, or other software.

The Speech-to-text transcription isn’t 100% exact but I made the transcription harder by using the machine’s internal microphone and talking fast. But you can obtain better results by using a larger model. Here’s a list of the available models.

Available models

Summary

hns is a really useful tool. It’s simple to use, simple to set up, and works well. All the hard work is performed by faster-whisper.

Website: github.com/primaprashant/hns
Support:
Developer: Prashant Anand
License: MIT License

hns is written in Python. Learn Python with our recommended free books and free tutorials.

Subscribe
Notify of
guest

This site uses Akismet to reduce spam. Read our Comment FAQ before commenting.

0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments