# `WhisperCpp.AbortHandle`
[🔗](https://github.com/rubas/whisper_cpp/blob/v0.2.0/lib/whisper_cpp/abort_handle.ex#L1)

Cooperative cancellation handle for `WhisperCpp.transcribe/3`.

Mint a handle, pass it via the `:abort_handle` option, then signal it
from another process to ask in-flight inference to return early.
whisper.cpp polls the abort flag between encoder/decoder steps; the
returned `%Transcription{}` contains whatever segments had been
produced before the abort took effect.

# `t`

```elixir
@type t() :: %WhisperCpp.AbortHandle{ref: reference()}
```

# `abort`

```elixir
@spec abort(t()) :: :ok
```

Asks any in-flight transcribe call using this handle to stop.

# `aborted?`

```elixir
@spec aborted?(t()) :: boolean()
```

Returns `true` once `abort/1` has been called for this handle.

# `new`

```elixir
@spec new() :: t()
```

Mints a fresh, un-aborted handle.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
