Skip to content

Granite 4.1: Support custom prompts #138

@brunjo

Description

@brunjo

When using granite-speech-4.1-2b in Python how can I set a custom prompt?

Example:

from crispasr import Session

sess = Session("granite-speech-4.1-2b-q4_k.gguf")
sess.set_ask("transcribe the speech with proper punctuation and capitalization.")
segs = sess.transcribe_vad(pcm, "silero-v5.1.2.bin")

This throws the following error: AttributeError: 'Session' object has no attribute 'set_ask'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions