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

@marxito/transcription-ai

v1.0.1

Published

Modulo de transcripcion de audio con IA usando Google Gemini - Soporta chunking, rate limiting, entity extraction y quality analysis

Readme

@centinela/transcription-ai

Modulo de transcripcion de audio con IA usando Google Gemini. Reutilizable para multiples proyectos con soporte para diferentes API Keys.

Caracteristicas

  • Transcripcion de audio usando Gemini AI
  • Soporte para multiples formatos: MP3, WAV, M4A, OGG, FLAC, WebM, AAC
  • Procesamiento con IA para extraccion de entidades
  • Rate limiting inteligente con queue
  • Soporte para diferentes tiers de Gemini
  • TypeScript nativo

Instalacion

npm install @centinela/transcription-ai
# o
yarn add @centinela/transcription-ai

Uso Basico

import { TranscriptionClient } from '@centinela/transcription-ai';

// Crear cliente
const client = new TranscriptionClient({
  projectId: 'mi-proyecto',
  apiKey: process.env.GEMINI_API_KEY!,
  options: {
    tier: 'free',        // 'free' | 'level1' | 'level2' | 'level3'
    logLevel: 'info'     // 'debug' | 'info' | 'warn' | 'error' | 'silent'
  }
});

// Inicializar
await client.initialize();

// Transcribir desde archivo
const result = await client.transcribe({
  source: '/path/to/audio.mp3'
});

console.log(result.text);

Transcripcion con IA

const result = await client.transcribe({
  source: audioBuffer,
  mimeType: 'audio/mp3',
  aiProcessing: {
    enabled: true,
    context: 'incident',      // 'incident' | 'investigation' | 'evidence' | 'victim' | 'general'
    extractEntities: true,
    formatText: true,
    generateSuggestions: true
  }
});

// Resultado
console.log(result.text);              // Texto transcrito
console.log(result.formattedText);     // Texto formateado por IA
console.log(result.entities);          // Entidades extraidas
console.log(result.suggestions);       // Sugerencias de la IA
console.log(result.metadata);          // Duracion, tokens, costo, etc.

Estimacion de Costos

const estimate = await client.estimate({
  source: '/path/to/audio.mp3'
});

console.log(estimate.duration);        // Duracion en segundos
console.log(estimate.tokens);          // Tokens estimados
console.log(estimate.estimatedCost);   // Costo estimado en USD
console.log(estimate.requiresChunking); // Si necesita dividirse

Verificar Capacidad

const capacity = client.checkCapacity();

console.log(capacity.available);       // Si hay capacidad disponible
console.log(capacity.queuePosition);   // Posicion en cola
console.log(capacity.currentRpm);      // Requests actuales por minuto
console.log(capacity.maxRpm);          // Limite de requests por minuto

Estadisticas de Uso

const stats = client.getUsageStats();

console.log(stats.requestsToday);
console.log(stats.tokensToday);
console.log(stats.totalRequests);
console.log(stats.estimatedTotalCost);

Configuracion Multi-Proyecto

// Proyecto 1
const centinelaClient = new TranscriptionClient({
  projectId: 'centinela-system',
  apiKey: process.env.GEMINI_KEY_CENTINELA!
});

// Proyecto 2
const otroClient = new TranscriptionClient({
  projectId: 'otro-proyecto',
  apiKey: process.env.GEMINI_KEY_OTRO!
});

// Cada cliente tiene su propio tracking y rate limiting

Limites de Gemini

| Parametro | Valor | |-----------|-------| | Duracion maxima | 9.5 horas | | Tamano inline | 20 MB | | Tokens por segundo | 32 |

Rate Limits por Tier

| Tier | RPM | Requisitos | |------|-----|------------| | Free | 15 | Cuenta gratuita | | Level 1 | 60 | Billing activo | | Level 2 | 120 | >$250 invertidos | | Level 3 | 300 | >$1,000 invertidos |

API Reference

TranscriptionClient

new TranscriptionClient(config: TranscriptionClientConfig)

interface TranscriptionClientConfig {
  projectId: string;
  apiKey: string;
  options?: TranscriptionClientOptions;
}

interface TranscriptionClientOptions {
  tier?: 'free' | 'level1' | 'level2' | 'level3';
  rateLimitStrategy?: 'queue' | 'reject' | 'backoff';
  maxConcurrent?: number;
  maxQueueSize?: number;
  timeout?: number;
  logLevel?: 'debug' | 'info' | 'warn' | 'error' | 'silent';
  model?: string;
}

TranscribeOptions

interface TranscribeOptions {
  source: string | Buffer | Uint8Array;
  mimeType?: AudioMimeType;
  language?: string;
  aiProcessing?: AIProcessingOptions;
  customPrompt?: string;
  priority?: number;
}

TranscriptionResult

interface TranscriptionResult {
  text: string;
  language: string;
  formattedText?: string;
  entities?: ExtractedEntities;
  suggestions?: string[];
  metadata: TranscriptionMetadata;
}

License

MIT