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

dectalk-tts

v1.0.1

Published

API wrapper for the Dectalk TTS system

Downloads

66

Readme

dectalk-tts

API status npm package

About

dectalk-tts is a simple Node package to interact with the aeiou Dectalk web API. It is developed in TypeScript and transpiles to JavaScript (ESM).

Dectalk is a text-to-speech engine originally created in the 1980s. Today, it is best known for viral videos of the game Moonbase Alpha.

aeiou is a third-party web API that makes interacting with Dectalk much easier.

This package sends all input to a third-party API, which could be a possible privacy concern! By using this package, you acknowledge and agree to not hold the author of this package liable for how the third party uses your data.

Please read the usage guidelines of the API.

Prerequesites

This package has no production dependencies!

However, it does require Node 18 or higher. Use node --version to check your node version.

Installation

npm install dectalk-tts

Usage

If the API returns a non-200 response, an error will be thrown. None of the examples below include error handling, but don't forget it!

ES Modules

import dectalk from 'dectalk-tts';
import { writeFileSync } from 'node:fs';

const output = await dectalk('aeiou');
writeFileSync('output.wav', output);

CommonJS

const dectalk = require('dectalk-tts');
const { writeFileSync } = require('node:fs');

(async () => {
	const output = await dectalk('John Madden');
	writeFileSync('output.wav', output);
})();

// or

dectalk('uuuuuuuuuu').then((output) => writeFileSync('output.wav', output));

Options

Please see Chapter 2 of the Dectalk guide PDF for details on how to customize your requests. You can choose different voices, have Dectalk sing, and more!

None of these options are hard-coded into this package, so you must format the request string yourself.

(The Dectalk guide PDF was copied from the Dectalk 4.61 release download, which can be found here.)

Development

When a merge request is created, the changes must pass linting, building, and unit tests. These checks are run automatically by GitHub. You can run them manually using npm run lint, npm run build, and npm test.

GitHub will also periodically run a test to confirm the API is still working. You can run this test manually with npm run test-api.

When a new Release is created, GitHub will automatically deploy the new version to the npm registry.

This project abides by Semantic Versioning and Keep A Changelog. To see a list of changes for each update, check the description of releases on GitHub.