Git Product home page Git Product logo

assistant-sample's Introduction

committers.top badge

BlackLight's GitHub stats

My language stats

  • ๐Ÿ”ฌ Science geek
  • ๐Ÿ–ฅ IT geek
  • ๐ŸŽต Music geek

I generally like to build things that solve problems with code and data. Among my open-source repositories you'll find:

  • Platypush. That's the main project I have been working on over the past couple of years. With the motto "build anything, automate everything", it's a general-purpose platform to connect integrations (covering everything from MQTT to cameras, from smart lights to Google services, from Arduino and ESP8266 devices to machine learning models, from social and messaging platforms to calendars, and so on) to one another through a consistent UI and backend interface. It also enables users to create arbitrary complex automation routines when events happen. It also comes with a powerful web extension.

  • micmon - a general-purpose Python library and set of tools for audio detection through Fourier analysis and Tensorflow.

  • theremin, a contactless, hands-in-air digital implementation of a Theremin musical instrument through a Leap Motion device.

  • Snort_AIPreproc, a machine learning module for the intrusion detection system Snort that removes the noise from the logs, clusters similar alerts together, finds common causal links between alerts and predicts the next step in a multi-step attack scenario.

  • fsom, a C library for managing Self-Organizing Maps.

  • fkmeans, a C library to perform K-means clustering.

  • nash, a small program to analyze Nash equilibrium situations in scenarios where the initial costs are known.

  • Voxifera, (probably) one of the earliest examples of voice assistants I'm aware of - I built it back in 2008 but it's largely discontinued now.

Plus, you'll probably find me collaborating to a few other dozens of repos - since Platypush comes with lots of integrations I often come to work closely with developers of other projects.

I also write technical articles (mostly about usages of Platypush to solve home automation, IoT and machine learning problems) that you can find, among the others, on Medium, on my website and HackerNoon.

๐Ÿ† My contributions have been awarded with the IoT contributor of the year 2020 HackerNoon prize.

Things I enjoy when AFK:

  • ๐ŸŽธ Play, record, produce and perform
  • ๐Ÿ„ Chase waves
  • ๐Ÿบ Enjoy craft beer
  • ๐Ÿ‘ช Raise a new geek

assistant-sample's People

Contributors

blacklight avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

1000mmr

assistant-sample's Issues

Running Hotword.py

I am having trouble running the hotword script, I have entered the path to my model file but it keeps saying no module named snowboy, even though I have sent the 3 wav files to the server successfully. See below terminal output, any help would be appreciated.

(env) pi@raspberrypi:~ $ python /home/pi/assistant-sample/hotword_sample.py
Traceback (most recent call last):
File "/home/pi/assistant-sample/assistant/hotword.py", line 7, in
import snowboydecoder
ModuleNotFoundError: No module named 'snowboydecoder'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/home/pi/assistant-sample/hotword_sample.py", line 2, in
from assistant.hotword import HotwordService
File "/home/pi/assistant-sample/assistant/hotword.py", line 9, in
import snowboy.snowboydecoder as snowboydecoder
ModuleNotFoundError: No module named 'snowboy'

Error opening RawStream: Device unavailable [PaErrorCode -9985]

When I run assistant_sample.py everything works fine. But when I run hotword_sample.py and say a hot word, the program crashes:

python3 hotword_sample.py
INFO:snowboy:Keyword 1 detected at time: 2020-06-14 19:22:37
Expression 'ret' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 1736
Expression 'AlsaOpen( &alsaApi->baseHostApiRep, params, streamDir, &self->pcm )' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 1904
Expression 'PaAlsaStreamComponent_Initialize( &self->capture, alsaApi, inParams, StreamDirection_In, NULL != callback )' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 2171
Expression 'PaAlsaStream_Initialize( stream, alsaHostApi, inputParameters, outputParameters, sampleRate, framesPerBuffer, callback, streamFlags, userData )' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 2840
Exception in thread Thread-1:
Traceback (most recent call last):
  File "/usr/lib/python3.7/threading.py", line 917, in _bootstrap_inner
    self.run()
  File "/home/pi/assistant-sample/assistant/hotword.py", line 68, in run
    self.detector.start(detected_callback=self.hotword_detected())
  File "/home/pi/assistant-sample/snowboydecoder.py", line 221, in start
    callback()
  File "/home/pi/assistant-sample/assistant/hotword.py", line 62, in callback
    self.assistant.start_conversation()
  File "/home/pi/assistant-sample/assistant/__init__.py", line 200, in start_conversation
    self._init_assistant()
  File "/home/pi/assistant-sample/assistant/__init__.py", line 107, in _init_assistant
    flush_size=self.audio_flush_size
  File "/home/pi/.local/lib/python3.7/site-packages/googlesamples/assistant/grpc/audio_helpers.py", line 190, in __init__
    blocksize=int(block_size/2),  # blocksize is in number of frames.
  File "/home/pi/.local/lib/python3.7/site-packages/sounddevice.py", line 1345, in __init__
    **_remove_self(locals()))
  File "/home/pi/.local/lib/python3.7/site-packages/sounddevice.py", line 861, in __init__
    'Error opening {0}'.format(self.__class__.__name__))
  File "/home/pi/.local/lib/python3.7/site-packages/sounddevice.py", line 2653, in _check
    raise PortAudioError(errormsg, err)
sounddevice.PortAudioError: Error opening RawStream: Device unavailable [PaErrorCode -9985]

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.