Skip to content

CAMEL-23390: Add audio transcription support to camel-openai#22872

Draft
Croway wants to merge 2 commits intoapache:mainfrom
Croway:feature/CAMEL-23390-audio-transcription
Draft

CAMEL-23390: Add audio transcription support to camel-openai#22872
Croway wants to merge 2 commits intoapache:mainfrom
Croway:feature/CAMEL-23390-audio-transcription

Conversation

@Croway
Copy link
Copy Markdown
Contributor

@Croway Croway commented Apr 30, 2026

Summary

  • Add a new audio-transcription operation to the camel-openai component that transcribes audio files using OpenAI's speech-to-text models (Whisper, GPT-4o Transcribe)
  • Support File, Path, InputStream, and byte[] as input body types
  • Expose key parameters as endpoint options and headers: audioModel, audioLanguage, audioPrompt, audioResponseFormat, audioTemperature, audioTimestampGranularities
  • Extend mock test infrastructure (OpenAIMock, OpenAIMockBuilder, OpenAIMockServerHandler) to support audio transcription expectations
  • Include 6 mock tests covering all input types, header overrides, and missing model validation

Jira: https://issues.apache.org/jira/browse/CAMEL-23390

Test plan

  • 6 mock tests pass (OpenAIAudioTranscriptionMockTest)
  • All 60 existing tests pass (no regressions)
  • Verified against a local MLX Audio server with Granite Speech model
  • CI green

Claude Code on behalf of Federico Mariani

@github-actions
Copy link
Copy Markdown
Contributor

🌟 Thank you for your contribution to the Apache Camel project! 🌟
🤖 CI automation will test this PR automatically.

🐫 Apache Camel Committers, please review the following items:

  • First-time contributors require MANUAL approval for the GitHub Actions to run
  • You can use the command /component-test (camel-)component-name1 (camel-)component-name2.. to request a test from the test bot although they are normally detected and executed by CI.
  • You can label PRs using skip-tests and test-dependents to fine-tune the checks executed by this PR.
  • Build and test logs are available in the summary page. Only Apache Camel committers have access to the summary.

⚠️ Be careful when sharing logs. Review their contents before sharing them publicly.

Add a new 'audio-transcription' operation that transcribes audio files
using OpenAI's speech-to-text models (Whisper, GPT-4o Transcribe) via
the existing openai-java SDK.
@Croway Croway force-pushed the feature/CAMEL-23390-audio-transcription branch from 3143cd4 to 1976359 Compare April 30, 2026 14:05
The audio transcription producer performs synchronous blocking work,
so DefaultProducer is a better fit than DefaultAsyncProducer.
@Croway Croway force-pushed the feature/CAMEL-23390-audio-transcription branch from 1976359 to 5715db9 Compare April 30, 2026 14:25
@github-actions github-actions Bot added the dsl label Apr 30, 2026
@github-actions
Copy link
Copy Markdown
Contributor

🧪 CI tested the following changed modules:

  • catalog/camel-catalog
  • components/camel-ai/camel-openai
  • dsl/camel-componentdsl
  • dsl/camel-endpointdsl
  • test-infra/camel-test-infra-openai-mock

⚠️ Some tests are disabled on GitHub Actions (@DisabledIfSystemProperty(named = "ci.env.name")) and require manual verification:

  • components/camel-ai/camel-openai: 6 test(s) disabled on GitHub Actions
All tested modules (15 modules)
  • Camel :: AI :: LangChain4j :: Agent
  • Camel :: AI :: LangChain4j :: Tools
  • Camel :: AI :: OpenAI
  • Camel :: Catalog :: Camel Catalog
  • Camel :: Component DSL
  • Camel :: Endpoint DSL
  • Camel :: JBang :: MCP
  • Camel :: JBang :: Plugin :: Route Parser
  • Camel :: JBang :: Plugin :: TUI
  • Camel :: JBang :: Plugin :: Validate
  • Camel :: Launcher :: Container
  • Camel :: Test Infra :: All test services
  • Camel :: Test Infra :: OpenAI Mock
  • Camel :: YAML DSL :: Validator
  • Camel :: YAML DSL :: Validator Maven Plugin

⚙️ View full build and test results

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants