New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

edge-tts

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

edge-tts

Use Microsoft Edge's online text-to-speech service from JavaScript WITHOUT needing Microsoft Edge or Windows or an API key

  • 1.0.1
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
16
decreased by-58.97%
Maintainers
1
Weekly downloads
 
Created
Source

edge-tts

edge-tts is a allows you to use Microsoft Edge's online text-to-speech service from within your TypeScript code.

Based on edge-tts for python.

Usage

import { tts, ttsSave } from 'edge-tts'

// buffer of mp3 data
const audioBuffer = await tts('hello world')

// or if you just want a file
await ttsSave('hello world', './tts.mp3')

// customize voice
await tts('hello world', {
  voice: 'es-VE-PaolaNeural', // can be any Voice.Name, Voice.ShortName, or Voice.FriendlyName
  volume: '+50%', // 50% louder
  rate: '-50%', // 50% the speed
  pitch: '-50Hz' // 50Hz lower
})

Find voices to use for the voice param using getVoices

import { getVoices, tts } from 'edge-tts'

// get list of available voices
const voices = await getVoices()

// get voices done by native english speakers
const englishVoices = voices.filter(v => v.Locale === 'en-US')

// select a random english voice
const voice = englishVoices[Math.floor(Math.random() * englishVoices.length)]

// can also use voice.ShortName, or voice.FriendlyName
const audioBuffer = await tts('hello world', { voice: voice.Name })

FAQs

Package last updated on 15 Apr 2024

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