Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

text-to-speech-converter

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

text-to-speech-converter

"play around converter"

  • 1.2.0
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
0
decreased by-100%
Maintainers
1
Weekly downloads
 
Created
Source

Text-to-speech-converter

text-to-speech-converter is a Node.js package that provides a simple API for converting text to speech using the festival text-to-speech synthesis tool.

Github

  git clone https://github.com/Francis-Mwaniki/TextToSpeechApi

Installation

Before you can use this package, you need to ensure that the festival text-to-speech synthesis tool is installed on your system. Follow the instructions below based on your operating system:

Linux (Debian-based systems, including Ubuntu):

sudo apt-get update
sudo apt-get install festival

Mac OS X:

brew install festival

Windows:

Running Festival on Windows

Using Windows Subsystem for Linux (WSL):

Windows Subsystem for Linux (WSL) allows you to run a Linux distribution alongside your Windows installation. This method enables you to use Festival within a Linux environment on your Windows system.

Enable WSL:
  1. Enable WSL: Follow the instructions from Microsoft's official documentation to enable WSL on your Windows version. You can find detailed steps here.

  2. Install a Linux Distribution:

    • Open Microsoft Store and search for a Linux distribution like Ubuntu.
    • Install the Linux distribution of your choice.
Run Festival in Linux Environment:
  1. Open the Installed Linux Distribution:

    • After installation, open the installed Linux distribution from the Start menu. It will open a Linux terminal window.
  2. Install and Run Festival:

    • Inside the Linux terminal, you can use standard Linux commands, including installing and running Festival. For example:
      sudo apt-get update
      sudo apt-get install festival
      festival
      

Usage

const TextToSpeech = require('text-to-speech-converter')

async function testSpeechGeneration() {
    try {
        const outputFilePath = 'output';
        const text = 'Hello francis, this is a test';
        const result = await TextToSpeech(text, outputFilePath);
        console.log(result);
    } catch (error) {
        console.error('Error:', error);
    }
}
testSpeechGeneration();

How it works

The TextToSpeech function takes in two parameters:

  • text: The text to be converted to speech.
  • outputFilePath: The path to the output file where the speech will be saved.

The function returns a promise that resolves to the path of the output file.

Test Demo

node test.js

Keywords

FAQs

Package last updated on 18 Oct 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc