npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

pico-speaker

v0.0.7

Published

Pico speaker for node js (linux systems)

Downloads

3

Readme

Pico speaker (TTS) module for node js

Synopsis

PicoSpeaker is a TTS module for node. I created this module for my personal assistant project on a Raspberry Pi (raspbian). I use picoSpeaker to have my raspberry talk to me.

Requirements

This module works on a linux based OS (raspbian, Ubuntu, Debian...) using alsa for audio.

Installation

This module requires pico tools and a alsa-utils to be installed.

sudo apt-get install libttspico0 libttspico-utils libttspico-data alsa-utils

You can simply add this module to your node.js project with

// sudo might be required depending on your system
npm install --save pico-speaker

Usage

There are four public methods you can use:

  • picoSpeaker.init(picoConfig); => this needs to be called to initialize clap detection. The picoConfig object is not mandatory but you can use it to overwrite the default configuration (see next section)
  • picoSpeaker.speak(text) => read text and returns a promise that is resolved when the sentenced is finished
  • picoSpeaker.repeat() => repeat last sentence returns a promise that is resolved when the sentenced is finished
  • picoSpeaker.shutUp() => interrupt all sentences being spoken at the moment
// Require the module
var picoSpeaker = require('pico-speaker');

// Define configuration
var picoConfig = {
   AUDIO_DEVICE: 'default:CARD=PCH',
   LANGUAGE: 'fr-FR'
};

// Initialize with config
picoSpeaker.init(picoConfig);

// Say hello
speaker.speak('Hello !').then(function() {
       // console.log("done");
    }.bind(this));

Configuration

You can pass a configuration object at the initialisation time (picoSpeaker.init(yourConfObject)). If you don't the following config will be used.

/* DEFAULT CONFIG */
    var CONFIG = {
        AUDIO_DEVICE: null, // will use default alsa device
        LANGUAGE: 'en-US'
    };

Tests

These will be added soon. Please do not hesitate to add some !

About the Author

I am a full-stack Javascript developer based in Lyon, France.

Check out my website

License

pico-speaker is dual licensed under the MIT license and GPL. For more information click here.