You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

tts-extractor

Package Overview
Dependencies
Maintainers
0
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

tts-extractor

A text-to-speech extractor for discord-player

1.0.4
latest
Source
npmnpm
Version published
Maintainers
0
Created
Source

Text-to-Speech Extractor

This is a custom extractor for discord-player that allows you to use Google's Text-to-Speech API to convert text into audio.

Installation

npm install tts-extractor

Usage

const { Player } = require("discord-player");

const { TTSExtractor } = require("tts-extractor");
// Or
import { TTSExtractor } from "tts-extractor";

const player = new Player(client, {});

await player.extractors.register(TTSExtractor, { /* options */ });

To call it, you will need to use the tts protocol in your search query.

For example:

const query = "Never gonna give you up";

player.play(voiceChannel, `tts:${query}`);

Options

OptionTypeDefaultDescription
languagestring"en"The language to use for the TTS query.
slowbooleanfalseWhether to use slower TTS speed.

Keywords

discord

FAQs

Package last updated on 10 Jan 2025

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