From ca0ff37799fc0cf83d6ad97f3529cef7a3198929 Mon Sep 17 00:00:00 2001 From: Jean-Louis Queguiner <690878+jqueguiner@users.noreply.github.com> Date: Mon, 9 Dec 2024 16:42:17 +0100 Subject: [PATCH 1/4] feat: add enhancer to subtitles-with-chromakey.html --- integrations-examples/OBS/subtitles-with-chromakey.html | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/integrations-examples/OBS/subtitles-with-chromakey.html b/integrations-examples/OBS/subtitles-with-chromakey.html index 81baf57..c0f01b1 100644 --- a/integrations-examples/OBS/subtitles-with-chromakey.html +++ b/integrations-examples/OBS/subtitles-with-chromakey.html @@ -138,7 +138,7 @@ const endpointing = queryParams.get("endpointing") ?? "200"; const model = queryParams.get("model") ?? "accurate"; const vocab = queryParams.get("vocab") ?? ""; - + const audio_enhancer = queryParams.get("audio_enhancer") !== "false"; let transcription_hint = ""; if (vocab !== "") { @@ -182,7 +182,8 @@ sample_rate: SAMPLE_RATE, model_type: model, endpointing: parseInt(endpointing, 10), - ...(vocab ? { transcription_hint: transcription_hint } : {}) + ...(vocab ? { transcription_hint: transcription_hint } : {}), + audio_enhancer: audio_enhancer }, { async onTranscript(transcription) { From 9f877be18f51c7cc41db1a7393b023dc99902152 Mon Sep 17 00:00:00 2001 From: Jean-Louis Queguiner <690878+jqueguiner@users.noreply.github.com> Date: Mon, 9 Dec 2024 16:46:01 +0100 Subject: [PATCH 2/4] Update subtitles-with-chromakey.html --- integrations-examples/OBS/subtitles-with-chromakey.html | 1 + 1 file changed, 1 insertion(+) diff --git a/integrations-examples/OBS/subtitles-with-chromakey.html b/integrations-examples/OBS/subtitles-with-chromakey.html index c0f01b1..5654d4e 100644 --- a/integrations-examples/OBS/subtitles-with-chromakey.html +++ b/integrations-examples/OBS/subtitles-with-chromakey.html @@ -206,6 +206,7 @@ "Thanks'", "thank you for watching", "Let's get going.", + "Sous-titrage Société Radio" ].includes(transcription.transcription) ) { return; From 5bfd1fc1eafc0d32790439859b51d2c6ae2e9407 Mon Sep 17 00:00:00 2001 From: Jean-Louis Queguiner <690878+jqueguiner@users.noreply.github.com> Date: Mon, 9 Dec 2024 16:53:39 +0100 Subject: [PATCH 3/4] feat: subtitles-with-chromakey.html --- integrations-examples/OBS/subtitles-with-chromakey.html | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/integrations-examples/OBS/subtitles-with-chromakey.html b/integrations-examples/OBS/subtitles-with-chromakey.html index 5654d4e..8216732 100644 --- a/integrations-examples/OBS/subtitles-with-chromakey.html +++ b/integrations-examples/OBS/subtitles-with-chromakey.html @@ -138,7 +138,7 @@ const endpointing = queryParams.get("endpointing") ?? "200"; const model = queryParams.get("model") ?? "accurate"; const vocab = queryParams.get("vocab") ?? ""; - const audio_enhancer = queryParams.get("audio_enhancer") !== "false"; + const audio_enhancer = queryParams.get("audio_enhancer") === null ? true : queryParams.get("audio_enhancer") !== "false"; let transcription_hint = ""; if (vocab !== "") { @@ -206,7 +206,6 @@ "Thanks'", "thank you for watching", "Let's get going.", - "Sous-titrage Société Radio" ].includes(transcription.transcription) ) { return; From d3b4613669a72ee187612776bc8c65d94c078fb6 Mon Sep 17 00:00:00 2001 From: Jean-Louis Queguiner <690878+jqueguiner@users.noreply.github.com> Date: Mon, 9 Dec 2024 16:56:04 +0100 Subject: [PATCH 4/4] feat: subtitles-with-chromakey.html --- integrations-examples/OBS/subtitles-with-chromakey.html | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/integrations-examples/OBS/subtitles-with-chromakey.html b/integrations-examples/OBS/subtitles-with-chromakey.html index 8216732..85bd832 100644 --- a/integrations-examples/OBS/subtitles-with-chromakey.html +++ b/integrations-examples/OBS/subtitles-with-chromakey.html @@ -125,7 +125,13 @@ const gladiaKey = queryParams.get("token"); if (!gladiaKey) { window.alert( - 'Append your API token to query param "token": "?token=aaaa-bbbb-cccc-dddd".\nYou can get one for free at https://app.gladia.io/\nYou can add a source language with "source_language" and a target language with "target_language".\nto perform a realtime translation.\nthe url should look like subtitles.gladia.io/?token=aaaa-bbbb-cccc-dddd&source_language=french&target_language=english\nfor example to translate from french to english.' + 'Append your API token to query param "token": "?token=aaaa-bbbb-cccc-dddd".\n' + + 'You can get one for free at https://app.gladia.io/\n' + + 'You can add a source language with "source_language" and a target language with "target_language".\n' + + 'To perform a realtime translation.\n' + + 'You can disable audio enhancement with "audio_enhancer=false" (enabled by default).\n' + + 'The url should look like subtitles.gladia.io/?token=aaaa-bbbb-cccc-dddd&source_language=french&target_language=english\n' + + 'For example to translate from french to english.' ); return; }