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

@matubyte/matuvoice

v0.1.1

Published

SDK oficial de MatuVoice — texto a voz con API REST

Readme

@matubyte/matuvoice

Convierte texto en audio con las voces de MatuVoice.

Requisitos

  • Una cuenta en MatuVoice
  • Una API key (mv_live_…) creada en tu dashboard
  • Node.js 18 o superior

Instalación

npm install @matubyte/matuvoice

Configuración

Guarda tu API key en una variable de entorno. No la escribas en el código.

MATUVOICE_API_KEY=mv_live_xxxxxxxx

Opcional (por defecto ya apunta a producción):

MATUVOICE_BASE_URL=https://api.matuvoice.matubyte.com

Ejemplo rápido

import { writeFileSync } from "node:fs";
import { MatuVoice } from "@matubyte/matuvoice";

const client = MatuVoice.fromEnv();

const result = await client.speech.synthesize({
  text: "Hola desde mi aplicación",
  voice: "juan",
});

writeFileSync("salida.mp3", result.audio);

Generar audio

const result = await client.speech.synthesize({
  text: "El texto que quieres escuchar",
  voice: "juan",
  rate: 1,    // opcional: velocidad (0.5 a 2)
  volume: 1,  // opcional: volumen (0.2 a 2)
});

// result.audio → archivo MP3 listo para guardar o enviar
// result.usage.remaining → caracteres que te quedan en tu plan

Ver voces disponibles

const { data: voces } = await client.voices.list({ language: "es" });

for (const voz of voces) {
  console.log(voz.id, voz.name);
}

Usa el id de la voz en speech.synthesize.

Consultar tu plan y saldo

const cuenta = await client.account.me();

console.log(cuenta.plan);
console.log(cuenta.usage.remaining, "caracteres restantes");

Errores frecuentes

| Código | Qué significa | |--------|---------------| | invalid_api_key | La API key es incorrecta o fue revocada | | quota_exceeded | Agotaste los caracteres de tu plan | | voice_not_found | El id de voz no existe | | synthesis_failed | No se pudo generar el audio; intenta de nuevo |

import { MatuVoiceError } from "@matubyte/matuvoice";

try {
  await client.speech.synthesize({ text: "Hola", voice: "juan" });
} catch (error) {
  if (error instanceof MatuVoiceError) {
    console.error(error.message);
  }
}

Más información

Licencia

MIT