Skip to content

Introduce TranscriptionModel interface #1478

Open
@habuma

Description

@habuma
Member

Even though only OpenAI and Azure OpenAI current offer transcription support, they are each represented by distinct transcription model types: OpenAiAudioTranscriptionModel and AzureOpenAiAudioTranscriptionModel. There is no common interface between these two, which means that you have to explicitly inject the one you are working with rather than inject a common interface.

They both implement Model<AudioTranscriptionPrompt, AudioTranscriptionResponse>, but it would be more handy to have a common interface like this that they each could implement:

public interface TranscriptionModel extends Model<AudioTranscriptionPrompt, AudioTranscriptionResponse> {

  AudioTranscriptionResponse call(AudioTranscriptionPrompt transcriptionPrompt);

}

Similar to ChatModel, there may be opportunity for some additional default convenience methods, as well. Perhaps one that accepts a Resource and returns a String and another that accepts a Resource and AudioTranscriptionOptions and produces a String.

Activity

habuma

habuma commented on Oct 6, 2024

@habuma
MemberAuthor

Note that I don't have the time right now to work on this and submit a PR, but don't mind doing so when I get a moment. But if someone wants to beat me to it, then by all means go for it.

mudabirhussain

mudabirhussain commented on Oct 7, 2024

@mudabirhussain
Contributor

I will do it....

added this to the 1.0.0-M5 milestone on Nov 19, 2024
modified the milestones: 1.0.0-M5, 1.0.0-M6 on Dec 23, 2024
markpollack

markpollack commented on Jan 21, 2025

@markpollack
Member

We won't have time to do this before GA, so postponing until after.

removed this from the 1.0.0-M6 milestone on Jan 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @habuma@markpollack@asaikali@mudabirhussain

        Issue actions

          Introduce TranscriptionModel interface · Issue #1478 · spring-projects/spring-ai