Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

[bot] RubyLLM speech synthesis (`RubyLLM.speak`) not instrumented

Abierto
#191 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
3/5
Tiempo estimado
1-2 días
Aptitud para principiantes
70/100
Tipo de issue
Nueva funcionalidad
Claridad
Bien especificado
Estado de actividad
Tranquilo
Stack tecnológico
ruby

Línea de trabajo

Comienza con lib/braintrust/contrib/ruby_llm/patcher.rb, instrumentation/chat.rb e integration.rb; después, compara los patrones existentes de Embed, Paint y Transcription. Revisa las fuentes de RubyLLM Speech y las versiones compatibles en Appraisals. Se considera terminado cuando RubyLLM.speak y RubyLLM::Speech.speak crean spans que capturan la entrada indicada, los metadatos, los detalles de la salida de audio y la latencia sin registrar bytes de audio sin procesar.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

Summary

The ruby_llm gem provides RubyLLM.speak(input, ...) for text-to-speech synthesis using AI TTS models. This API is not instrumented by this SDK. The current RubyLLM integration only instruments RubyLLM::Chat — covering chat completions, tool execution, and streaming. speak is a distinct generative AI execution surface (it drives a TTS model to produce audio from text) and produces usage data (token counts via some providers), yet no span is created for it.

This is a direct parity gap with the OpenAI Audio integration gap (#146), which notes that TTS execution via client.audio.speech.create is also uninstrumented. Both use AI models to generate audio from text input.

What is missing

RubyLLM.speak(input, model:, voice:, ...) / RubyLLM::Speech.speak(input, ...) — invokes a TTS provider (OpenAI tts-1, tts-1-hd, or equivalent) and returns a RubyLLM::Speech object containing:

  • data — raw audio bytes
  • model — model ID used for synthesis
  • voice — voice selected
  • format — audio format (mp3, wav, flac, etc.)
What a span should capture
  • Input: the text string passed to speak
  • Metadata: model, voice, format, provider
  • Output: audio format and size (not the raw binary bytes)
  • Metrics: time_to_first_token (latency)

The implementation pattern already exists: RubyLLM::Embed, RubyLLM::Paint, and RubyLLM::Transcription are single-method execution surfaces (see issue #136). RubyLLM::Speech follows the same shape and would be instrumented with the same approach: a new SpeechPatcher wrapping the speak class method.

Braintrust docs status

not_found — The Braintrust RubyLLM integration docs at https://www.braintrust.dev/docs/integrations/sdk-integrations/ruby-llm document only chat completions, tool calls, token usage, and streaming. Speech synthesis is not mentioned.

Upstream sources

Local repo files inspected

  • lib/braintrust/contrib/ruby_llm/patcher.rb — defines only ChatPatcher; no SpeechPatcher
  • lib/braintrust/contrib/ruby_llm/instrumentation/chat.rb — wraps Chat#complete and Chat#execute_tool only
  • lib/braintrust/contrib/ruby_llm/integration.rb — registers [ChatPatcher] only
  • Appraisals — tests ruby_llm at versions 1.8, 1.9, and latest; speech.rb is present in all supported versions
  • Grep for speak, Speech, tts, SpeechPatcher across lib/braintrust/ returns zero matches
Lenguaje dominante
Ruby
Estrellas
9
Forks
11
Merge medio
3 d 43 min
PR fusionados (30 d)
9

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de braintrustdata/braintrust-sdk-ruby

Todos los issues de braintrustdata/braintrust-sdk-ruby

Issues similares

Más issues de Ruby

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.