Skip to content

Instantly share code, notes, and snippets.

View JarbasAl's full-sized avatar
🏠
Working from home

JarbasAI JarbasAl

🏠
Working from home
View GitHub Profile
@JarbasAl
JarbasAl / requirements_at_date.py
Last active February 12, 2025 10:51
find the version of a pypi package at a specific date
import requests
import argparse
from datetime import datetime
# Function to get the PyPI release data
def get_versions(package_name):
url = f'https://pypi.org/pypi/{package_name}/json'
response = requests.get(url)
if response.status_code == 200:
> what are the STT options

There are several Speech-To-Text (STT) options you can consider for OpenVoiceOS. Some popular STT plugins include:

1. FasterWhisper - A fast option that can be run locally on a machine with sufficient resources.
2. VOSK - Works well for offline needs.
3. Google Translate STT - A cloud-based solution with good accuracy.
4. Deepgram - Another cloud-based option that provides a variety of features.
@JarbasAl
JarbasAl / ffplayer.py
Last active January 28, 2025 18:06
python audio player wrapper around ffplay (provided by ffmpeg)
import os
import signal
import subprocess
import threading
import time
from typing import Optional, Callable
Callback = Callable[[], None] # for typing

Padatious Overview

Padatious is an intent parser built on top of the fann2 neural network library. It enables dynamic intent classification by adapting at runtime based on the skills installed by the user in OVOS (Open Voice Operating System). When a skill is loaded, it sends its utterance examples (training data) to Padatious, allowing the classifier to update and adjust to new intents or modifications as skills are added or removed.

  • Dynamic Adaptation: Padatious can adapt in real-time as new skills are installed or removed.
  • Customizable: You can add new intents and training data at runtime without needing to retrain the entire model.
  • Efficient: Padatious is written in python but uses libfann under the hood for performance

Troubleshooting Wake Word Issues

Wake word detection in raspOVOS offers several options, each with its advantages and limitations. Understanding these can help resolve potential issues and improve performance.

By default, raspOVOS uses the precise-lite model with the wake word "hey mycroft." This model was trained by MycroftAI for their Mark2 device. However, there are a few things to consider:

  • Microphone Compatibility: The performance of precise models can be impacted if the specific properties of your microphone (e.g., sensitivity, frequency response) do not match the data used to train the model. While the default precise-lite model was trained with a balanced dataset from a variety of Mycroft users, there is no guarantee it will work optimally with your microphone.
  • Speaker Demographics: Precise models, including precise-lite, are often trained with datasets predominantly featuring adult male voices. As a result, the model may perform poorly with voices that are outside this demogr
@JarbasAl
JarbasAl / ovos-support.sh
Created January 18, 2025 02:49
create support package with logs and such
#!/bin/bash
# Colors for styling the output
RED='\033[0;31m'
GREEN='\033[0;32m'
YELLOW='\033[0;33m'
CYAN='\033[0;36m'
RESET='\033[0m'
@JarbasAl
JarbasAl / b100p.py
Created January 3, 2025 19:27
base 100 with padding
from typing import Union
class B100P:
"""
B100P is a class that provides encoding and decoding methods for transforming text into an emoji-based representation
with a custom padding mechanism. The first byte of the encoded data indicates how many padding bytes were added
during encoding, which is then removed during decoding.
The padding is added to make the data length a multiple of 4, and the padding size is included as part of the encoded data.
@JarbasAl
JarbasAl / hm_pyramid.md
Last active December 31, 2024 17:35
hivemind security model

Main Concepts of the Pyramid Network

image

  1. Hierarchical Trust:

    • Each node only trusts the node directly above it (higher in the hierarchy).
    • Nodes do not have full knowledge of the entire network but operate under a limited scope, making the system more secure by design.
  2. Upward Flow of Information:

  • Any information can move upward in the hierarchy, but it is authorized, filtered and processed by every intermediary node.
@JarbasAl
JarbasAl / README.md
Last active December 18, 2024 21:18
a oregon trail like game set in space

Space Expedition: A Galactic Survival Adventure 🚀🌌

Space Expedition is an interactive space adventure game where players take on the role of a spaceship captain leading a mission to a distant exoplanet. Along the way, players will face a mix of challenges, from dangerous events to beneficial side quests, as they manage their resources and crew. Will you survive the harsh conditions of deep space and complete the mission?

Features 🌟

  • Role Selection: Choose from three different roles—Engineer 👩‍🔧, Medic 🩺, or Scout 🕵️‍♂️. Each role provides unique benefits, such as more supplies, better healing, or improved resource gathering.
  • Random Events: Encounter a variety of events throughout your journey, including resource shortages, ship malfunctions ⚠️, and opportunities for trade 💰. Make decisions to overcome or capitalize on each event.
  • Side Quests: Each role offers unique side quests 🛠️ that can help or hinder your journey. Choose wisely, as your decisions will affect your health, suppl
@JarbasAl
JarbasAl / demo.py
Last active December 16, 2024 15:10
simple text game engine
"""simple single scene game with no game objects"""
from text_engine import (Callbacks, Conditions, GameScene, Keyword, KeywordIntent, GameIntents, IFGameEngine)
class TheRoom(GameScene):
def __init__(self):
self.inventory = []
# Define the scene entities
self.key = Keyword(name="key")