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 🙏

© 2026 – Pkg Stats / Ryan Hefner

react-native-edge-tts

v2.0.0

Published

React Native text-to-speech library using Microsoft Edge's online TTS service. Works WITHOUT needing Microsoft Edge, Windows, or an API key

Readme

react-native-edge-tts

React Native text-to-speech library using Microsoft Edge's online TTS service. Works WITHOUT needing Microsoft Edge, Windows, or an API key.

Features

  • 🎯 React Native Focused - Optimized for React Native applications
  • 🔊 High Quality Voices - Access to Microsoft Edge's neural TTS voices
  • 📝 Word Boundaries - Get timing information for each word (useful for subtitles/karaoke)
  • 🌍 Multiple Languages - Support for 400+ voices across 100+ languages
  • 📱 No Native Dependencies - Pure JavaScript implementation

Installation

npm install react-native-edge-tts
# or
yarn add react-native-edge-tts

Quick Start

Simple Usage

import { EdgeTTS } from 'react-native-edge-tts';

// Create TTS instance
const tts = new EdgeTTS('Hello, world!', 'en-US-EmmaMultilingualNeural');

// Synthesize speech
const result = await tts.synthesize();

// result.audio is a Blob containing MP3 audio
// result.subtitle contains word timing information

With Custom Options

import { EdgeTTS } from 'react-native-edge-tts';

const tts = new EdgeTTS('Hello, world!', 'en-US-EmmaMultilingualNeural', {
  rate: '+20%',    // Speaking rate
  volume: '+10%',  // Volume adjustment
  pitch: '+5Hz',   // Pitch adjustment
});

const result = await tts.synthesize();

Streaming API

For more control, use the Communicate class directly:

import { Communicate } from 'react-native-edge-tts';

const communicate = new Communicate('Hello, world!', {
  voice: 'en-US-EmmaMultilingualNeural',
  rate: '+10%',
});

for await (const chunk of communicate.stream()) {
  if (chunk.type === 'audio' && chunk.data) {
    // Handle audio data (Uint8Array)
  } else if (chunk.type === 'WordBoundary') {
    // Handle word timing
    console.log(`Word: ${chunk.text}, Offset: ${chunk.offset}`);
  }
}

List Available Voices

import { listVoices, VoicesManager } from 'react-native-edge-tts';

// Simple list
const voices = await listVoices();
console.log(voices);

// With filtering
const manager = await VoicesManager.create();
const englishVoices = manager.find({ Language: 'en' });

Generate Subtitles

import { EdgeTTS, createVTT, createSRT } from 'react-native-edge-tts';

const tts = new EdgeTTS('Hello, this is a test.', 'en-US-EmmaMultilingualNeural');
const result = await tts.synthesize();

// Create VTT subtitles
const vtt = createVTT(result.subtitle);

// Create SRT subtitles
const srt = createSRT(result.subtitle);

Playing Audio in React Native

Since React Native doesn't have native audio playback, you'll need a library like expo-av or react-native-sound:

import { EdgeTTS } from 'react-native-edge-tts';
import { Audio } from 'expo-av';

async function speakText(text: string) {
  const tts = new EdgeTTS(text, 'en-US-EmmaMultilingualNeural');
  const result = await tts.synthesize();
  
  // Convert Blob to base64
  const arrayBuffer = await result.audio.arrayBuffer();
  const base64 = btoa(String.fromCharCode(...new Uint8Array(arrayBuffer)));
  
  // Play with expo-av
  const { sound } = await Audio.Sound.createAsync({
    uri: `data:audio/mpeg;base64,${base64}`,
  });
  
  await sound.playAsync();
}

API Reference

EdgeTTS

Simple API for text-to-speech synthesis.

new EdgeTTS(text: string, voice?: string, options?: ProsodyOptions)

Communicate

Streaming API for more control over the synthesis process.

new Communicate(text: string, options?: CommunicateOptions)

listVoices

Fetches available voices from Microsoft Edge TTS service.

await listVoices(): Promise<Voice[]>

VoicesManager

Utility class for filtering and finding voices.

const manager = await VoicesManager.create();
manager.find({ Language: 'en', Gender: 'Female' });

Popular Voices

| Voice Name | Language | Gender | |------------|----------|--------| | en-US-EmmaMultilingualNeural | English (US) | Female | | en-US-AvaMultilingualNeural | English (US) | Female | | en-US-AndrewMultilingualNeural | English (US) | Male | | en-GB-SoniaNeural | English (UK) | Female | | ja-JP-NanamiNeural | Japanese | Female | | ko-KR-SunHiNeural | Korean | Female | | zh-CN-XiaoxiaoNeural | Chinese (Mandarin) | Female |

License

AGPL-3.0 - See LICENSE for details.

Credits

Based on edge-tts-universal by Travis.