Skip to content

🎥 Make videos programmatically with React

Fix transcription install status typography

JonnyBurgeree5d675e28fc
diff --git a/packages/studio/src/components/Transcription/TranscriptionModalWithOptionalWhisper.tsx b/packages/studio/src/components/Transcription/TranscriptionModalWithOptionalWhisper.tsx
index 509996233e..38f4b492eb 100644
--- a/packages/studio/src/components/Transcription/TranscriptionModalWithOptionalWhisper.tsx
+++ b/packages/studio/src/components/Transcription/TranscriptionModalWithOptionalWhisper.tsx
@@ -47,7 +47,10 @@ const statusStyle: React.CSSProperties = {
alignItems: 'center',
color: LIGHT_TEXT,
display: 'flex',
+ fontFamily: 'sans-serif',
+ fontSize: 14,
gap: 10,
+ lineHeight: 1.5,
};
const errorStyle: React.CSSProperties = {
diff --git a/packages/studio/src/test/caption-queue-processor.test.tsx b/packages/studio/src/test/caption-queue-processor.test.tsx
index f22f097ea6..e18247da6d 100644
--- a/packages/studio/src/test/caption-queue-processor.test.tsx
+++ b/packages/studio/src/test/caption-queue-processor.test.tsx
@@ -83,6 +83,14 @@ mock.module('@remotion/whisper-webgpu', () => ({
supportsTranslation: false,
webGpuDownloadSize: 119_697_479,
},
+ {
+ name: 'small.en',
+ modelId: 'onnx-community/whisper-small.en_timestamped',
+ parameters: 244_000_000,
+ multilingual: false,
+ supportsTranslation: false,
+ webGpuDownloadSize: 614_690_756,
+ },
],
isWhisperModelCached: ({model}: {model: string}) => {
cacheCheck = {model};
diff --git a/packages/studio/src/test/whisper-webgpu-capability.test.tsx b/packages/studio/src/test/whisper-webgpu-capability.test.tsx
index 1d288680bc..6f02eaffe9 100644
--- a/packages/studio/src/test/whisper-webgpu-capability.test.tsx
+++ b/packages/studio/src/test/whisper-webgpu-capability.test.tsx
@@ -51,11 +51,15 @@ test('opens transcription after installing Whisper without restarting', async ()
window.remotion_isStudio = true;
window.remotion_isReadOnlyStudio = false;
window.remotion_staticBase = '';
- const fetchSpy = spyOn(globalThis, 'fetch').mockResolvedValue(
- new Response(JSON.stringify({success: true, data: {}})),
+ let resolveInstall!: (response: Response) => void;
+ const fetchSpy = spyOn(globalThis, 'fetch').mockImplementation(
+ (() =>
+ new Promise<Response>((resolve) => {
+ resolveInstall = resolve;
+ })) as unknown as typeof fetch,
);
try {
- const {container, getByRole} = render(
+ const {container, getByRole, getByText} = render(
<ModalsProvider>
<TranscriptionModalWithOptionalWhisper
state={{
@@ -70,6 +74,11 @@ test('opens transcription after installing Whisper without restarting', async ()
);
fireEvent.click(getByRole('button', {name: 'Continue'}));
+ const installing = getByText(`Installing ${WHISPER_WEBGPU_PACKAGE}…`);
+ expect(getComputedStyle(installing).fontFamily).toBe('sans-serif');
+ expect(getComputedStyle(installing).fontSize).toBe('14px');
+ expect(getComputedStyle(installing).lineHeight).toBe('1.5');
+ resolveInstall(new Response(JSON.stringify({success: true, data: {}})));
await waitFor(() => {
expect(window.remotion_installedPackages).toContain(
WHISPER_WEBGPU_PACKAGE,