Skip to main content

canUseWhisperWebGpu()v4.0.518

Asynchronously checks whether WebGPU can be used in the current browser. WebGPU, a usable adapter, and a secure context (or localhost) is required.

support.ts
import {canUseWhisperWebGpu} from '@remotion/whisper-webgpu'; const result = await canUseWhisperWebGpu(); if (!result.supported) { throw new Error(result.detailedReason); } console.log(result.supported);

Return type

A Promise resolving to a CanUseWhisperWebGpuResult object with the following properties:

supported

boolean

true if WebGPU transcription is supported, false otherwise.

reason?

If supported is false, a categorized reason why WebGPU transcription is not supported:

  • window-undefined
  • webgpu-unavailable
  • webgpu-requires-secure-context

detailedReason?

If supported is false, a human-readable explanation of why WebGPU transcription is not supported.

Compatibility

BrowsersEnvironments
Chrome
Firefox
Safari

See also