Giter Site home page Giter Site logo

jstnmcbrd / dectalk-tts Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 0.0 563 KB

API wrapper for the Dectalk TTS system

Home Page: https://npmjs.com/package/dectalk-tts

License: Apache License 2.0

JavaScript 3.16% TypeScript 96.84%
api dectalk text-to-speech tts wav

dectalk-tts's Introduction

dectalk-tts

API status Validate
NPM Version NPM License NPM Type Definitions NPM Downloads
Node version

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.

Warning

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.

dectalk-tts's People

Contributors

jstnmcbrd avatar

Stargazers

MJ avatar

Watchers

 avatar

dectalk-tts's Issues

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.