Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

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

Aperta
#191 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
70/100
Tipo di issue
Funzionalità
Chiarezza
Specificata chiaramente
Stato di attività
Tranquilla
Stack tecnologico
ruby

Direzione di ricerca

Inizia da lib/braintrust/contrib/ruby_llm/patcher.rb, instrumentation/chat.rb e integration.rb, quindi confronta i pattern esistenti di Embed, Paint e Transcription. Controlla le sorgenti di RubyLLM Speech e le versioni supportate in Appraisals. Il lavoro è completato quando RubyLLM.speak e RubyLLM::Speech.speak creano span che acquisiscono l'input indicato, i metadati, i dettagli dell'output audio e la latenza senza registrare byte audio grezzi.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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
Lingua principale
Ruby
Stelle
9
Fork
10
Merge medio
3g 43m
PR unite (30g)
9

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di braintrustdata/braintrust-sdk-ruby

Tutte le issue di braintrustdata/braintrust-sdk-ruby

Issue simili

Altre issue su Ruby

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.