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

node-megabalabolka

v1.0.1

Published

This package communicates with balcon and gives the information back to nodejs

Downloads

14

Readme

Mega Balabolka! The node.js Library

This package (or library) allows you to communicate with Balabolka's Console Application (balcon) for use in your nodejs application.

Installation

Via npm:

$ npm install node-megabalabolka

Prerequisites

In order to use this library, you must have balcon added to your PATH. You can download balcon by clicking here.

Usage

Usage for basic generation, output will be in the WAV format.

const balcon = require('node-megabalabolka')

options = {
    list: false,
    warnings: true,
    writeToBuffer: false,
    ignoreLength: false,
    raw: false,
    encoding: false,
    pitch: 0,
    speed: 0,
    voice: "Microsoft David Desktop",
    volume: "100",
    text: "This is an example of mega balabolka generation.",
    file: `${Math.round(Date.now() / 1000)}.wav`
}
balcon.generate(options).then(a => {
    if (options.writeToBuffer == true) {
        console.log("BufferLength:" + a.length)
    }
}).catch(error => {
    console.error(error)
    return false;
})

Inputs

All inputs are handled by passing them through an Object. Those inputs are as followed:

list:

Assignments: Can be set to true or false. Usage: will ignore all other commands and be used to list voices

warnings:

Assignments: Can be set to true or false. Usage: will log all warning sent out

writetoBuffer:

Assignments: Can be set to true or false. Usage: Passes the command -o and will write all sounddata to STDOUT to be used later in a buffer.

ignoreLength:

Assignments: Can be set to true or false. Usage: Passes along an -il command to balcon which omits the length of data in the WAV header.

raw:

Assignments: Can be set to true or false. Usage: Output will contain raw PCM although this might only work in SAPI 5

encoding:

Assignments: Can be set to utf8, ansi, or unicode. Usage: Output will be encoded to use either three encoding formats.

pitch:

Assignments: Interger. Usage: Sets the pitch of the voice.

speed:

Assignments: Interger. Usage: Sets the speed of the voice.

volume:

Assignments: Interger. Usage: Sets the volume of the voice.

text:

Assignments: String. Usage: Sets the text that will be generated.

file:

Assignments: String. Usage: Sets the filename and/or path that will be used to write the generation to disc. Will be ignored if writeToBuffer is true.

voice:

Assignments: Text. Usage: Sets the voice being used the generate the text. you can find out what voices you have installed on your computer by running balcon -l