Skip to content

AI

#291: Extract Text From Audio Files With Vosk

With sounddevice and PyAudio we found two solutions to record audio files. With this new knowledge we can go one step further and find an option to extract the text from those recordings. For this task we ignore the online services and jump directly to two solutions that run on our local machine. In this post we use Vosk to transcribe our audio file, while next week we find out how well Whisper solves this task.

#287: PyTorch With GPU Support

Last week we noticed that Coqui did not run on our GPU. If you have a dedicated graphics card, that is not what you want. While CPUs are getting faster and faster, they are usually much slower than what we could get out of our graphics card. Let us see how we can activate GPU support for PyTorch.

#284: Basic Text-to-Speech With Google Translate

When it comes to text-to-speech (TTS), we may think that this is a solved problem, and we can use any library we find to get a good result. Unfortunately, that is not the case. There are a lot of older models that sound like a robot and even newer ones are far away from the quality we got used to by commercial products.

For our first steps with text-to-speech we try a minimal approach and use Google Translate. That gives us a quick win and is enough if we only want to work with a few sentences. The next posts will cover locally installed solutions that do not send data to a service.

#281: Language Detection in Python

For our experiment with Bert and Goodreads it did not matter if the review was written in Englisch or German. But not all tools are that flexible when it comes to the language. Often, we need to load a language-specific model and for that we need a reliable way to detect the language. Let us explore two libraries that can help us with this task in Python.

#279: Sentiment Analysis in Python

Sentiment analysis is a powerful tool that allows us to understand the emotions and opinions behind written text. Be it reviews, social media posts, or customer feedback – if we know the emotions and how strong they are, we can flag important texts and prioritise them to address problems before they blow up.

In this post we use pre-trained models from Hugging Face and the Natural Language Toolkit (NLTK). That way we can run everything locally and jump directly to the analysis part to get fast feedback.

#278: Optimise the LLM Client

While we now have a script to access a local LLM, we have a usability problem: We have to wait until the LLM has found an answer before we see that something is going on. Until then our script looks dead, and we may think it failed while it just waits on the LLM. A word-by-word output as we get with the web interfaces or at least a paragraph-by-paragraph update may soften this problem. Let us see how we can shorten the feedback time.

#277: Access Local LLMs Through LM Studio

Machine learning is the hot topic of the day, especially Large Language Models (LLM). Despite the hype, my experience with them has been mixed. Sometimes they provide great help on the first try, but often the result needs significant rework or is completely wrong. In this post we do the groundwork to quickly try a lot of local LLMs to find one that offers a net benefit for us. It will not necessarily be a durable solution, but we can hit the ground running and get feedback before we spend all the time to run the wrong model on our local machine.