Look how Open Voice OS is running on a 2017 Lenovo X270 laptop 💻

More information about this video.

Skills used:

The fallback ChatGPT skill interacts with a local AI as demonstrated in this video.

Here is the fastfetch for the laptop specs (hardware and software).

Below is the Waybar module I wrote which interacts with Open Voice OS bus.

#!/bin/env bash
#
# This module listens to the Open Voice OS message bus and display
# a JSON object based on the message type. This JSON object has to
# be compatible with the expected output by Waybar.
# websocat and jq must be installed before running the script.
#
# Documentation: https://openvoiceos.github.io/message_spec/

# Variables
sleep_utterance=1
sleep_speak=3
main_unicode="✨"
websocket_url="ws://127.0.0.1:8181"

# Kill websocat if already running
if pgrep websocat &>/dev/null; then
    killall websocat
fi

# Initial printed message
printf '{"text": "%s Open Voice OS"}\n' "$main_unicode"

# Connection to the bus via websocat
websocat -t - -U autoreconnect:"$websocket_url" | while read -r line; do
    # JSON parsing
    message_type="$(echo "$line" | jq -r .type)"
    message_utterance="$(echo "$line" | jq -r '. | select(.type=="'"$message_type"'") | .data.utterance')"
    message_utterances="$(echo "$line" | jq -r '. | select(.type=="'"$message_type"'") | .data.utterances[0]')"

    # Check for specific messages
    case "$message_type" in
    recognizer_loop:wakeword)
        printf '{"text": "%s Open Voice OS", "class": "listen"}\n' "$main_unicode"
        ;;
    recognizer_loop:record_end)
        printf '{"text": "%s Open Voice OS"}\n' "$main_unicode"
        ;;
    recognizer_loop:utterance)
        printf '{"text": "⭐ %s"}\n' "${message_utterances^}"
        sleep "$sleep_utterance"
        ;;
    speak)
        printf '{"text": "💫 %s"}\n' "${message_utterance^}"
        sleep "$sleep_speak"
        ;;
    recognizer_loop:audio_output_end)
        printf '{"text": "%s Open Voice OS"}\n' "$main_unicode"
        ;;
    esac
done
1 Like