← Todos los NIPs

NIP-A0

Mensajes de voz

BorradorEventos

Notas de voz cortas de hasta un minuto aproximadamente: kind 1222 para un mensaje nuevo y kind 1244 para una respuesta de voz, cada uno apuntando a un archivo de audio.

De un vistazo

Estado
En uso, pero todavía puede cambiar.
Kinds
Último cambio
27 jul 2025

Pruébalo

Edita el formulario o el JSON: ambos se mantienen sincronizados, la insignia indica si el resultado es válido y, al tocar cualquier campo, se explica qué hace.

Qué construir

Cómo se conectan las partes: Una conversación por voz

Ejemplos
Válido 1 nota

Aún sin firmar · Solo claves de demo. Las claves secretas de estos personajes son públicas a propósito.

Formulario
1 ene 2025, 0:00 UTC

Contenido

Exactamente una URL que apunta directamente al archivo de audio.

Tags

  1. imeta Opcional

    Metadatos multimedia NIP-92 para una URL del content: un tag por URL, cada valor es un par 'clave valor'.

  2. t Opcional

    Un hashtag, como en cualquier otra nota.

Añadir tag

Cómo funciona este NIP

Paso 1 de 4

Graba y sube

La app graba un clip corto, lo sube (por ejemplo a un servidor Blossom) y pone la URL del archivo en el content. El content es solo la URL, nada más.

En el curso

Ningún capítulo del curso cubre este NIP todavía. El editor de arriba es la forma más rápida de empezar.

Se basa en

Ver también

Especificación

El texto de las especificaciones se cita en inglés del repositorio nostr-protocol/nips. Nuestras explicaciones y la interfaz están traducidas. Código fuente en GitHub en el commit 0046368

Leer la especificación466 palabras, citadas del repositorio en el commit 0046368.

This NIP defines new events kind: 1222 for root messages and kind: 1244 for reply messages to be used for short voice messages, typically up to 60 seconds in length.

Specification

Event Kind 1222 and Kind 1244

The kind: 1222 event is defined as follows:

  • content: MUST be a URL pointing directly to an audio file.
    • The audio file SHOULD be in audio/mp4 (.m4a) format using AAC or Opus encoding. Clients MAY support other common audio formats like audio/ogg, audio/webm, or audio/mpeg (mp3), but audio/mp4 is recommended for broad compatibility and efficiency.
    • The audio duration SHOULD be no longer than 60 seconds. Clients publishing kind: 1222 events SHOULD enforce this limit or provide a clear warning to the user if exceeded.
  • tags:
    • Tags MAY be included as per other NIPs (e.g., t for hashtags, g for geohash, etc.).

The kind: 1244 event is defined as follows:

  • To be used for replies, kind: 1244 events MUST follow the structure of NIP-22.
  • content: MUST be a URL pointing directly to an audio file.
    • The audio file SHOULD be in audio/mp4 (.m4a) format using AAC or Opus encoding. Clients MAY support other common audio formats like audio/ogg, audio/webm, or audio/mpeg (mp3), but audio/mp4 is recommended for broad compatibility and efficiency.
    • The audio duration SHOULD be no longer than 60 seconds. Clients publishing kind: 1222 events SHOULD enforce this limit or provide a clear warning to the user if exceeded.
  • tags:
    • Tags MAY be included as per other NIPs (e.g., t for hashtags, g for geohash, etc.).

Visual representation with imeta (NIP-92) tag (optional)

The following imeta (NIP-92) tags MAY be included so clients can render a visual preview without having to download the audio file first:

  • waveform: amplitude values over time, space separated full integers, less than 100 values should be enough to render a nice visual
  • duration: audio length in seconds

Examples

Root Voice Message Example

{
  "content": "https://blossom.primal.net/5fe7df0e46ee6b14b5a8b8b92939e84e3ca5e3950eb630299742325d5ed9891b.mp4",
  "created_at": 1752501052,
  "id": "...",
  "kind": 1222,
  "pubkey": "...",
  "sig": "...",
  "tags": [
    [
      "imeta",
      "url https://blossom.primal.net/5fe7df0e46ee6b14b5a8b8b92939e84e3ca5e3950eb630299742325d5ed9891b.mp4",
      "waveform 0 7 35 8 100 100 49 8 4 16 8 10 7 2 20 10 100 100 100 100 100 100 15 100 100 100 25 60 5 4 3 1 0 100 100 15 100 29 88 0 33 11 39 100 100 19 4 100 42 35 5 0 1 5 0 0 11 38 100 94 17 11 44 58 5 100 100 100 55 14 72 100 100 57 6 1 14 2 16 100 100 40 16 100 100 6 32 14 13 41 36 16 14 6 3 0 1 2 1 6 0",
      "duration 8"
    ]
  ]
}