Scanning audio and speech models with garak

garak's audio module tests audio-to-text models and the audio side of multimodal models, including spoken jailbreak attempts that text-only probes never send. This page covers what to scan, how to configure it, and what to confirm before relying on the results.

On this page

Why scanning audio and speech models with garak needs its own plan

A team running a speech-to-text model or a voice-enabled multimodal model in front of users needs to know one thing before launch: do spoken inputs get past the protections that were tested against typed text? A text-only scan answers a different question. It sends prompts as written text, so it never exercises the path where a request arrives as sound, is transcribed or decoded, and reaches the model with instructions the text filters never saw. garak, the Generative AI Red-teaming and Assessment Kit, has an audio module for this case. It contains probes that test audio-to-text models and the audio component of multimodal models, including the AudioAchillesHeel probe. Teams should plan an audio scan when the product accepts voice input, when a speech model transcribes audio before a language model acts on it, or when a multimodal model accepts audio alongside text.

garak is a free, command-line tool licensed under Apache 2.0. It is installed from PyPI with pip and requires Python 3.11 or newer. Because it runs from the command line, the audio scan fits into the same environment and run pattern as the rest of a garak program, but the audio path needs its own generator configuration, since the target must accept audio input and return text that garak can evaluate. Before scheduling runs, confirm with the maintainers' documentation at the garak user guide which audio probes your installed version includes and which generators can send audio to your model. Also confirm that your endpoint's audio format and encoding match what the probes send. The audio module changed across releases: the OpenAI Harmony format for audio inputs arrived in v0.14.1, so teams on earlier versions should check whether their target can be tested at all.

The plan should settle three things before the first run. First, decide which audio path the scan will cover: the transcription front end alone, the language model behind it, or the full voice pipeline, since each produces different failures. Second, record the baseline text probe results for the same model so that any gap between text and audio behavior is visible in the reports. Third, assign an owner for the JSONL report and the garak.log file, which carry every attempt and its evaluation across runs. Audio results are harder to read by eye than text, so a reviewer who can replay the failing attempts is essential for judging whether a FAIL reflects a real weakness in your deployment.

How an audio probe reaches the model and returns a verdict

The flow starts with garak's audio probes, which produce audio prompts for an audio-to-text or multimodal model. A generator carries each prompt across the endpoint, the trust boundary where audio enters the system under test, and returns the model's text. Detectors then judge each response, and every attempt and verdict is written to the JSONL report, while garak.log keeps the run's debugging trail. Check at the endpoint that the audio reaches the model unchanged, since a transcription or preprocessing step in front of the model changes what is actually tested.

Audio prompts cross the model endpoint, where detectors judge each response into the report.

How to set up an audio scan with garak

This sequence takes a team from a clean Python environment to a first audio probe run against an audio-capable target, with a check at each step so the results can be trusted. It produces a configured generator, a small scan report and a debugging log the team can review before scaling up.

  1. Install garak from PyPI

    The engineer creates an isolated Python environment running Python 3.11 or newer, then installs garak with pip from the PyPI package. garak is a command-line tool developed on Linux and macOS, so run the setup on one of those platforms or confirm your environment is supported before you start. Verification: run the garak help command from the same shell and confirm it prints the available options without import errors. Record the installed version so the report can be tied to it later.

  2. Confirm the target accepts audio input

    Before writing any configuration, the team confirms that the model or application under test can receive audio and return text. Check the vendor documentation or the model card for the audio input format, and confirm whether the endpoint accepts audio directly or only through a transcription front end. Ask the owner of the endpoint which audio formats and maximum clip lengths it accepts. Verification: send one short test clip by hand with curl or a similar client and get a text response back, so you know the input path works outside garak.

  3. Select audio probes from the audio module

    Review the probes in garak's audio module, which covers probes that test audio-to-text models and the audio component of multimodal models, including the AudioAchillesHeel probe. Read the probe source in probes/audio.py to see what each probe sends and which detectors it uses by default. Run garak's list option for probes so you can confirm the exact probe names your installed version provides. Verification: write down the selected probe names in the scan plan and confirm each one appears in the list output.

  4. Configure the generator for the target

    Set up the generator that connects garak to the target. For a custom application or a model behind your own API, use the REST generator with a short YAML file that describes the endpoint, its headers, the request body with the prompt placeholder, and how to read the response. For a supported model source, such as a Hugging Face Hub model or an OpenAI API model, use that generator and pass the model name. Keep API keys in environment variables rather than in the file itself. Verification: run a single prompt through the generator in a dry or minimal test and confirm the response text is parsed correctly.

  5. Run a small audio scan

    Start with one audio probe and a low number of generations so the first run is quick to read and easy to diagnose. The default is 5 generations per prompt, and you can reduce this for the trial. Point garak at the generator configuration and the selected probe, and let it complete without changing other options. Verification: the run finishes without connection or parsing errors, and the console shows the probe name with a pass or fail result for each prompt set.

  6. Check the JSONL report

    Open the JSONL report written for the run. Each line records one attempt, the prompt sent, the response received and the evaluation from the detector. Confirm that the attempts show the audio input you expected, that the responses are the target's replies and not error messages, and that the detector verdicts match what you read in the responses. Verification: pick three or four attempts at random and check by hand that the recorded response and verdict are consistent. If the responses are errors or empty, return to the generator step before scaling up.

  7. Review garak.log for errors

    Open garak.log, the debugging file that continues across runs, and search for warnings and errors from the generator, the audio handling and the detectors. Note any failed requests, timeouts or unsupported format messages, and fix them before running the full probe set. Because the log carries over between runs, record the start time of this run so you can read only the new entries. Verification: the log shows the run completing with no unresolved generator or format errors, and the team has a written note of anything they still need to confirm with the endpoint owner.

Which audio target and configuration fits your system

A standalone speech recognition or audio-to-text model takes sound in and returns text, so the scan has to deliver audio to the model and judge the text that comes back. Start by confirming where the model runs. For a model you host yourself, a local or Hub-based generator is usually the natural path, but you must check that the generator passes audio to the model instead of a text transcript of it.

  • Generator choice: Select the generator that loads the model where it runs, and confirm it sends audio input for that model class.
  • Input format: Check the sample rate, channel count and file format the model expects, and whether garak's audio probes deliver audio in a form the model accepts.
  • Output handling: Confirm whether the model returns only a transcript or also a generated reply, because detectors judge whatever text the model produces.
  • Version requirement: The OpenAI Harmony format for audio inputs arrived in v0.14.1, so use that version or later if your model relies on it, and pin the version in your configuration.
  • Hardware needs: Local inference needs enough accelerator memory for the model, which the model card or vendor documentation should state.

Before running the probes, send a short benign recording and confirm the output looks as you expect.

Audio scan options and when each fits

This table compares the main configuration choices for an audio scan: probe selection, generator type, generations per prompt and harness. Read each row against the model you are testing, since an audio-to-text model and a multimodal model with an audio input need different generator setups. The main takeaway is that the default probewise harness suits a first pass, while teams with custom audio endpoints or specific spoken-attack goals usually need a tailored configuration.

OptionWhat it coversWhen it fitsWhat to confirm
Audio probes only (AudioAchillesHeel)Runs the audio module's probes against an audio-to-text model or the audio input of a multimodal modelFirst scan of a speech model where spoken jailbreak exposure is the main questionConfirm the probe's current behavior in the release you install
Text probes with audio inputReuses text attack families delivered through audio, so spoken and text attacks are comparedTeams that need a like-for-like view of text and spoken exposureCheck which text probes your generator can send as audio
Hosted API generatorSends audio to a hosted model through a built-in generator such as the OpenAI API generatorHosted audio-capable models where the provider accepts audio inputsConfirm the model accepts audio and the generator supports that input format
REST generatorPosts audio or prompts to a custom endpoint described in a short YAML fileSpeech pipelines wrapped in your own service, such as transcription then LLMConfirm the endpoint returns plaintext or JSON the generator can parse
Generations per prompt (default 5)Each prompt is sent five times, and a probe fails when any attempt produces undesirable outputDefault for a first pass where any successful spoken attack mattersRaise or lower the count only with a reason, since spoken output can vary between attempts
Probewise harness (default)Runs each probe with its recommended detectors and writes the JSONL reportA baseline scan of a standard audio-to-text or multimodal endpointConfirm the recommended detectors fit your output format
Custom configuration filePins probes, generator settings, detectors and generations in a config file for repeatable runsEndpoints that need a non-default audio format, a transcription step or a specific detectorAgree the config with the team that owns the endpoint before the first run
Audio format supportDepends on whether the generator passes the audio format the target expects, including the OpenAI Harmony format added in v0.14.1Models that require a specific audio encoding or message formatCheck the garak release notes for the version you run, since v0.14.1 added Harmony support

Security and operational considerations for audio test data

Audio scans produce artifacts that carry more than text: generated speech, transcripts and the endpoint credentials that made the calls. The cards below cover how to classify, store, configure and run these artifacts so that the scan itself does not become a data exposure.

Treat generated audio as sensitive

Audio probes often ask a model to speak or transcribe content that resembles real customer speech, account details or internal instructions. Generated clips and the transcripts derived from them should be classified at the same level as the most sensitive data the application handles. Confirm the classification with your data owner before the first run, because a clip that replays a spoken jailbreak can still reveal how your system responds to sensitive phrasing.

Storing the JSONL report

Each run writes a JSONL report of every attempt and its evaluation, which for audio probes can include prompts, model responses and transcripts. Keep the report in a location with access controls matching its classification, and decide who can read, copy or delete it. Ask whether your team needs the full report or only summary output for ticketing, since the summary is easier to share widely.

garak README

Handling the garak.log file

The garak.log file is a debugging record that continues across runs, so it accumulates evidence from every scan on the same host. Log lines can contain endpoint addresses, request details and fragments of prompts or responses. Set a rotation and retention policy for garak.log, and check whether your host's log shipping sends it to a central system where broader teams can read it.

Keeping endpoint credentials out of configs

The REST generator and hosted generators are configured through files that name the endpoint and often its authentication. Do not commit those files with live keys to a shared repository. Load secrets from your secrets manager or environment at run time, use a test-scoped credential with the smallest permissions the audio endpoint needs, and rotate it after the engagement ends.

Running scans where audio stays inside

If the audio model processes voice data that must not leave the organization, the scanner and the target must both run inside that boundary. Confirm which generator you will use and whether it sends audio to an external service. Plan the host, network path and storage so that generated clips never cross to a hosted provider you have not approved for that data.

Questions teams ask before scanning speech models

Is garak free to use for scanning speech models?

Yes, garak is licensed under Apache 2.0 and the maintainers describe it as a free tool. The license covers the software, not the cost of the work around it. Your budget will mostly go to the people who prepare test audio, configure the target endpoint, run and review scans, and act on findings. Model API usage on the target side may also be billed by the provider, so confirm those charges with the vendor before scanning. The license terms themselves are worth reading in the garak README before adoption.

Can an internal team run garak against a speech model alone?

Often yes, if the team has Python experience, access to the target, and someone who can judge whether an audio result is a real failure. garak is a command-line tool installed from PyPI, and the PyPI package requires Python 3.11 or newer. The harder parts are usually outside the tool: building a reliable path from audio input to the transcript or model response, handling test accounts and rate limits, and deciding which findings matter for your product. Confirm internally who owns each of those before starting.

What does the team need to provide before a speech scan starts?

The scan needs a reachable target and a clear description of how audio enters the system. Prepare the following:

  • Endpoint access, either a hosted API key for a test account or a network path to a self-hosted model.
  • A description of the input format, sample rate and whether the model accepts audio directly or through a transcription front end.
  • Written permission from the system owner, and a window agreed with operations for load.
  • A named reviewer who can interpret the audio outputs and decide on fixes.

Without these, most time goes to discovery rather than testing.

What drives the effort of a speech model scan?

Effort rises with endpoint complexity, the number of audio probes selected, and the generations per prompt. By default garak makes 5 generations per prompt, so a larger probe set multiplies the number of requests. Each additional layer, such as a transcription service, a guardrail or a tool-calling step, adds configuration and debugging work. Access to test accounts also matters, because a scan that runs against a shared production key is slower to approve and riskier to run. Ask any provider to state the endpoint layers, probe count and generation count they assumed.

How long does a first audio scan take?

It depends on the target and its rate limits. A self-hosted model on dedicated hardware can be scanned far faster than a hosted API with strict request quotas, and each probe's audio prompts must be generated, sent and evaluated. Approvals for test accounts and load windows often take longer than the scan itself. Ask for a schedule that separates the setup phase, the first pass and the review of results, and confirm the rate limits of the target before agreeing dates.

Do spoken jailbreaks need a different test from text probes?

Yes. garak's audio module covers probes that test audio-to-text models and the audio side of multimodal models, including the AudioAchillesHeel probe. Text probes send instructions as characters, so a model's safety behavior may differ when the same instruction arrives as speech that its audio path converts. Running only text probes can leave that path untested. The audio module is one part of coverage, and results should be read alongside the rest of your garak scan configuration.

What does a partner deliver beyond the raw garak output?

Raw output is a JSONL report of every attempt and its evaluation, plus a garak.log file. A partner would typically add the scan plan and the justification for probe selection, the target setup and its assumptions, a triage of failures with reproduction steps, and recommended fixes for the transcription path, guardrails or system prompts. Where the engagement covers it, a retest after changes shows what was resolved. Agree the deliverables in writing before work starts, since most DeployOpen engagements are fixed-scope.

Can a scan of a speech model support a compliance review?

A scan produces testing evidence, but it does not establish compliance on its own. DeployOpen prepares systems, controls and evidence for compliance assessments, while independent auditors and certification bodies issue any audit report or certification. Ask your assessor early what form of evidence they expect, such as the scan configuration, dated reports and the remediation record, and keep the audio inputs and versions used so results can be repeated.

How DeployOpen works on this

DeployOpen plans and runs garak audio testing as a fixed-scope engagement, starting from the audio-to-text models or multimodal models you operate and the way users reach them. The work covers scope, a configured test setup inside your environment, a documented findings set, and handover to your team, with ongoing support available as a retainer.

How we scope

  • Inventory which audio-to-text and multimodal models accept spoken input, and where that audio enters your application.
  • Agree in writing which garak audio probes run, which detectors judge output, and which attack variants are in scope.
  • Confirm the target endpoint, authentication, and whether audio is sent to the model directly or through a speech-to-text front end.

How we build

  • Configure garak in your environment, with a generator that reaches your model endpoint through the access path you approve.
  • Prepare a repeatable run configuration so the same audio probes can be rerun after model or prompt changes.
  • Verify each probe run by reviewing sample attempts and detector judgments before treating any result as a finding.

How we hand over

  • Deliver the findings with the JSONL report, the run configuration, and the evaluation of each failed audio attempt.
  • Document which text probes were run alongside audio probes, so your team can see what spoken inputs add to coverage.
  • Walk your security and engineering teams through remediation options and retest after fixes are applied.

How we support

  • Rerun audio probes after model upgrades, voice pipeline changes, or new speech-to-text components, under a retainer if you choose.
  • Keep garak upgrades under review, since report formats and scores can change between releases, and document the impact.
  • Confirm with your team which results need to be retained as testing evidence and for how long.

Sources and further reading

Talk to our team.

Tell us what you're working on, whether it's a deployment, an audit, a security test or a cyber range. You'll speak with an engineer who can help you scope it.

  • 30-minute call: free, with no obligation.
  • NDA on request: we can sign before you share details.
  • Clear next steps: a scope and plan after the call.