[Python] How to enable word_timestamps=True when querying a Whisper model deployed in...

Discussão em 'Python' iniciado por Stack, Maio 23, 2025.

  1. Stack

    Stack Membro Participativo

    I’ve deployed OpenAI’s Whisper model as a serving endpoint in Databricks and I’m trying to transcribe an audio file.

    import whisper

    model = whisper.load_model("small")
    transcript = model.transcribe(
    word_timestamps=True,
    audio="path/to/audio"
    )


    In Databricks, I query the model like this:

    response = workspace_client.serving_endpoints.query(
    name="whisperv3",
    inputs=[base64_audio_chunks[first_audio_key]]
    )
    print(response.predictions[0])


    My question is: How can I enable word_timestamps=True when querying the model in Databricks? Is there a way to pass this option in the inputs or another parameter?

    Continue reading...

Compartilhe esta Página