Skip to content

Instantly share code, notes, and snippets.

View forslund's full-sized avatar
🌙

Åke forslund

🌙
View GitHub Profile
@forslund
forslund / librespot-dev.sh
Last active December 21, 2024 02:42
Building deb package for librespot
# Add deb-src entry for your distribution
sudo echo "deb-src http://ports.ubuntu.com/ubuntu-ports focal main restricted multiverse universe" >> /etc/apt/sources.list
sudo apt-get update
# Install pre-requisites
sudo apt-get build-dep -y cargo
sudo apt-get install -y libssl-dev libcurl4-gnutls-dev quilt
# Install cargo-deb to build debin packages through cargo
cargo install cargo-deb
rom mycroft_bus_client import MessageBusClient, Message
print('Setting up client to connect to a local mycroft instance')
client = MessageBusClient()
def print_listening(message):
print('Mycroft is listening')
def print_not_listening(message):
@forslund
forslund / setup.py
Created August 6, 2020 07:53
Mycroft Plugin setup template
#!/usr/bin/env python3
from os.path import join, abspath, dirname, exists
from setuptools import setup
"""Template for mycroft plugin setup.py.
Fill in constants below and change the setup metadata to suite your module.
"""
PLUGIN_TYPE = '' # tts, stt or audioservice
import sys
from threading import Event
from mycroft.configuration import Configuration
from mycroft.messagebus.client import MessageBusClient
from mycroft.util import (
create_echo_function,
create_daemon,
reset_sigint_handler,
wait_for_exit_signal
import time
import wave
import speech_recognition as sr
frames = []
microphone = sr.Microphone()
with microphone as source:
import re
import time
words = [
'where',
'which',
'when',
'what',
'that',
'will',
{
"max_allowed_core_version": 21.2,
"_server": {
"url": "https://api.mycroft-test.net"
},
"_lang": "sv-se",
"listener": {
"_recording_timeout_with_silence": 50,
"_recording_timeout": 100,
"_wake_word": "blueberry",