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 / m2ovos.py
Last active March 6, 2024 22:18
modernize mycroft skills
import os
import shutil
from os.path import basename, dirname
import subprocess
from yapf.yapflib.yapf_api import FormatCode
IMPORTS_MAP = {
"IntentQueryApi": "from ovos_utils.intents.intent_service_interface import IntentQueryApi # TODO - deprecated utils 0.1.0",
"save_settings": "save_settings = lambda a, b: None # TODO - DEPRECATED use self.settings.store()",
"make_priority_skill": "make_priority_skill = lambda k: False # TODO - DEPRECATED, add RuntimeRequirements classproperty instead",
@JarbasAl
JarbasAl / lang_support_status.md
Last active April 4, 2024 14:33
some insights on OVOS lang support state

TOTAL ESTIMATE

~7000 UNIQUE STRINGS

  • LINGUA FRANCA TOTAL UNIQUE STRINGS: 760
  • OVOS CLASSIFIERS TOTAL UNIQUE STRINGS: 310
  • SKILLS TOTAL UNIQUE STRINGS: 5979

OVOS + Hatchery store skills

@JarbasAl
JarbasAl / ovos.md
Last active April 8, 2024 22:48
how to deploy OVOS

Individual Device

OVOS provides a list of public servers maintained by trusted community members, no account needed

image

For SBCs like the raspberry pi 3 or where minimum latency is desired it might be benefitial to offload STT and TTS to a more powerful server, such as a OVOS public server or a commercial service (google, amazon...)

image

@JarbasAl
JarbasAl / bus_debugger.py
Created April 22, 2024 07:03
pprint bus messages for hivemind debugging
import json
from rich.console import Console
from rich.table import Table
from rich.json import JSON
from threading import Lock
from ovos_bus_client import MessageBusClient, Message
from ovos_config import Configuration
import sys
import time

Contribute to Our Project Translations with GitLocalize!

Welcome and Thank You!

Thank you for your interest in helping translate our project! Your contributions will help make our project accessible to more people around the world. We’ve made it easy for you to get started, even if you’re not familiar with GitHub or coding. Follow the steps below to join our translation effort using GitLocalize.

Step-by-Step Guide to Translating with GitLocalize

Visit Our GitLocalize Project Page

image

STT - tips and tricks

Saving Transcriptions

You can enable saving of recordings to file, this should be your first step to diagnose problems, is the audio inteligible? is it being cropped? too noisy? low volume?

set "save_utterances": true in your listener config, recordings will be saved to ~/.local/share/mycroft/listener/utterances

If the recorded audio looks good to you, maybe you need to use a different STT plugin, maybe the one you are using does not like your microphone, or just isn't very good for your language

data feriado municipio
11 de Janeiro Tomada de Óbidos aos mouros Óbidos
13 de Janeiro Restauração do município Cadaval, Santa Marta de Penaguião, Viana do Alentejo, Vila Nova de Poiares
14 de Janeiro Batalha das Linhas de Elvas (1659) Elvas
15 de Janeiro Santo Amaro Santa Cruz (Madeira)
20 de Janeiro São Sebastião Santa Maria da Feira
22 de Janeiro São Vicente São Vicente, Vila do Bispo
2 de Fevereiro Nossa Senhora das Candeias Mourão
10 de Fevereiro Restauração do concelho Aguiar da Beira
18 de Fevereiro São Teotónio Valença do Minho
@JarbasAl
JarbasAl / MLP_embeddings.py
Last active July 26, 2024 21:08
experiment creating domain specific embedding models using scikit-learn only
import joblib
import numpy as np
from sklearn.base import BaseEstimator, TransformerMixin
from sklearn.datasets import make_classification
from sklearn.decomposition import PCA
from sklearn.ensemble import RandomForestClassifier
from sklearn.feature_extraction import DictVectorizer
from sklearn.linear_model import LogisticRegression
from sklearn.metrics import accuracy_score
from sklearn.model_selection import train_test_split
@JarbasAl
JarbasAl / triples.py
Last active December 4, 2024 01:54
extract triples with spacy and https://spacy.io/universe/project/coreferee
from typing import Tuple, Dict, List
import spacy
from spacy.cli import download
from spacy.tokens import Token
class DependencyParser:
def __init__(self):
self.NEGATION = {"no", "not", "n't", "never", "none"}