liveBook · Manning

OpenAiAudioTranscriptionModel

As explained in Spring AI in Action

OpenAiAudioTranscriptionModel is a Spring AI component that converts spoken audio into text using OpenAI services.

OpenAiAudioTranscriptionModel converts spoken audio into text through Spring AI’s TranscriptionModel abstraction. It accepts an audio Resource and returns transcription text, avoiding direct lower-level OpenAI API handling. section 8.1.1

A typical integration proceeds as follows:

  • Configure the OpenAI starter and API key; existing OpenAI chat and embedding configuration can be disabled when another API handles those features. section 8.1.1

Audio question endpoint

A POST /audioAsk endpoint accepts an audio multipart field and gameTitle, transcribes the audio, constructs a Question, and returns the conversational answer. A sample request uploads what_is_graveyard.mp3 for Burger Battle.

How Spring AI in Action covers it

How deep it goes
Explains configuration, dependency injection, Resource input, call(), and controller integration, while deferring text-to-speech implementation.
Examples
Demonstrates MP3 upload, game-specific question construction, and a returned answer about Burger Battle’s Graveyard.
What it assumes
Requires Spring AI OpenAI setup and an API key, while the voice service contract and transcription flow are defined explicitly.
What you can do after
Builds a voice-enabled endpoint that transcribes uploaded audio and submits the resulting text to an existing service.
How it connects
Links transcription with Spring AI, OpenAI, Azure OpenAI, audio resources, multipart uploads, and conversational services.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Spring AI in Action. The section links point to the parts of the book it draws on.