Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

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

Đang mở
#191 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức phù hợp với người mới
70/100
Loại issue
Tính năng
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Ít trao đổi
Công nghệ
ruby
Lĩnh vực
observability-sre

Hướng nghiên cứu

Bắt đầu với lib/braintrust/contrib/ruby_llm/patcher.rb, instrumentation/chat.rb và integration.rb, sau đó so sánh các pattern Embed, Paint và Transcription hiện có. Kiểm tra các source của RubyLLM Speech và các phiên bản được hỗ trợ trong Appraisals. Được xem là hoàn tất khi RubyLLM.speak và RubyLLM::Speech.speak tạo các span thu thập input được liệt kê, metadata, thông tin chi tiết về audio output và latency mà không ghi lại các byte audio thô.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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
Ngôn ngữ chính
Ruby
Star
9
Fork
11
Merge trung bình
3 ngày 43 phút
Pull request đã merge (30 ngày)
9

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của braintrustdata/braintrust-sdk-ruby

Tất cả issue của braintrustdata/braintrust-sdk-ruby

Issue tương tự

Thêm issue về Ruby

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.