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.tsimport {canUseWhisperWebGpu } from '@remotion/whisper-webgpu'; constresult = awaitcanUseWhisperWebGpu (); if (!result .supported ) { throw newError (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-undefinedwebgpu-unavailablewebgpu-requires-secure-context
detailedReason?
If supported is false, a human-readable explanation of why WebGPU transcription is not supported.
Compatibility
| Browsers | Environments | |||||
|---|---|---|---|---|---|---|
Chrome | Firefox | Safari | ||||