From e04885bef7176ea365016e32a01af68ce3b7397a Mon Sep 17 00:00:00 2001 From: SC-Samir Date: Tue, 26 May 2026 15:02:21 +0200 Subject: [PATCH 1/6] tutorial whisper --- src/_includes/icons/openai.svg | 1 + src/_tutorials/whisper/index.md | 112 ++++++++++++++++++++++++++++++++ 2 files changed, 113 insertions(+) create mode 100644 src/_includes/icons/openai.svg create mode 100644 src/_tutorials/whisper/index.md diff --git a/src/_includes/icons/openai.svg b/src/_includes/icons/openai.svg new file mode 100644 index 000000000..eea5a3aa8 --- /dev/null +++ b/src/_includes/icons/openai.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/_tutorials/whisper/index.md b/src/_tutorials/whisper/index.md new file mode 100644 index 000000000..490bc9b77 --- /dev/null +++ b/src/_tutorials/whisper/index.md @@ -0,0 +1,112 @@ +--- +title: Building speech to text with Whisper +logo: openai +category: ai +permalink: /tutorials/whisper +modified_at: 2026-05-26 +--- + +Whisper is an automatic speech recognition model that converts speech to text. It was trained on a large, multilingual audio corpus, which makes it robust to different accents, background noise, and real-world conditions. As an open-source model, it is well suited for developers who want to integrate speech-to-text without depending entirely on a proprietary API. + +Instead of relying on an external SaaS API, Whisper can run directly inside a web application using `faster-whisper`. This implementation keeps the same model family while improving inference speed and reducing resource usage. + +In this tutorial, a small speech-to-text demo is deployed on Scalingo using a FastAPI backend, a minimal HTML/JavaScript frontend that records audio in the browser, and `faster-whisper` running on CPU in a single web container. + +## Planning your deployment + +For this kind of application, it is recommended to start with an M container and move to a larger size if startup time or inference latency becomes an issue. The application warms the model in the background at startup and stores downloaded model files under `/tmp/models`. + +The application supports two environment variables: `MODEL_USE`, which defaults to `small`, and `MODEL_CACHE_DIR`, which defaults to `/tmp/models`. Starting with `MODEL_USE=small` is a good default, then moving to a larger model only if better accuracy is required. + +## Deploying the application + +### Using the command line + +1. Clone the repository: + + ```bash + git clone https://github.com/Scalingo/whisper-speech-to-text + cd whisper-speech-to-text + ``` + +2. Create the application on Scalingo: + + ```bash + scalingo create whisper-speech-to-text + ``` + + The Scalingo command line automatically detects the Git repository and + adds a Git remote pointing to Scalingo: + + ```bash + git remote -v + + origin https://github.com/Scalingo/whisper-speech-to-text (fetch) + origin https://github.com/Scalingo/whisper-speech-to-text (push) + scalingo git@ssh.osc-fr1.scalingo.com:whisper-speech-to-text.git (fetch) + scalingo git@ssh.osc-fr1.scalingo.com:whisper-speech-to-text.git (push) + ``` + +3. Configure the application: + + ```bash + scalingo --app whisper-speech-to-text env-set MODEL_USE=small + scalingo --app whisper-speech-to-text env-set MODEL_CACHE_DIR=/tmp/models + ``` + +4. Deploy to Scalingo: + + ```bash + git push scalingo main + ``` + + Scalingo detects the Python environment, installs the dependencies declared by the project, and starts the application using the `Procfile`. The speech-to-text demo is now deployed. + +## Testing the deployment + +Before using the application, check the health endpoint to verify that the model is loaded: + + ```bash + curl https://whisper-speech-to-text.osc-fr1.scalingo.io/health + ``` + +Once the model is ready, open the application in a browser and test recording from the HTML interface. The transcription endpoint can also be tested directly with `curl`: + + ```bash + curl -X POST https://whisper-speech-to-text.osc-fr1.scalingo.io/transcribe \ + -F "file=@sample.webm" + ``` + +The backend writes the uploaded file to `/tmp`, transcribes it, then returns a JSON response containing the transcript and model metadata. + +## Updating the model + +The application reads the Whisper model name from the `MODEL_USE` environment variable, so changing model size does not require code changes. + +To switch the deployed application to another model, update the variable from the command line: + + ```bash + scalingo --app whisper-speech-to-text env-set MODEL_USE=medium + ``` + +Model names such as `tiny`, `base`, `small`, `medium`, `large-v3`, or `turbo` can be used, depending on the balance required between accuracy, startup time, and CPU usage. + +After changing the variable, restart the application so the web process reloads the selected model: + + ```bash + scalingo --app whisper-speech-to-text restart + ``` + +At the next startup, the application downloads or reloads the selected model into the cache directory and warms it in the background before serving transcription requests. + +## Updating your application + +To deploy a new version, commit the changes and push again to the Scalingo remote: + + ```bash + git add . + git commit -m "Update Whisper demo" + git push scalingo main + ``` + +If the frontend template, model settings, or Python dependencies change, redeploying is enough for Scalingo to rebuild and restart the application with the new version. From 631eaaca5d6d01128ecdd289cef06ca8f7e59ce2 Mon Sep 17 00:00:00 2001 From: SC-Samir Date: Thu, 28 May 2026 12:56:43 +0200 Subject: [PATCH 2/6] Update the tutorial with Etienne advice --- src/_tutorials/whisper/index.md | 64 ++++++++++++++++++--------------- 1 file changed, 35 insertions(+), 29 deletions(-) diff --git a/src/_tutorials/whisper/index.md b/src/_tutorials/whisper/index.md index 490bc9b77..78d2c1977 100644 --- a/src/_tutorials/whisper/index.md +++ b/src/_tutorials/whisper/index.md @@ -1,26 +1,26 @@ --- -title: Building speech to text with Whisper +title: Building Speech to Text with Whisper logo: openai category: ai permalink: /tutorials/whisper modified_at: 2026-05-26 --- -Whisper is an automatic speech recognition model that converts speech to text. It was trained on a large, multilingual audio corpus, which makes it robust to different accents, background noise, and real-world conditions. As an open-source model, it is well suited for developers who want to integrate speech-to-text without depending entirely on a proprietary API. +[Whisper] is an automatic speech recognition model that converts speech to text. It was trained on a large, multilingual audio corpus, which makes it robust to different accents, background noise, and real-world conditions. As an open source model, it is well suited for developers who want to integrate speech to text without depending entirely on a proprietary API. -Instead of relying on an external SaaS API, Whisper can run directly inside a web application using `faster-whisper`. This implementation keeps the same model family while improving inference speed and reducing resource usage. +Instead of relying on an external SaaS API, Whisper can run directly inside a web application using [faster-whisper], an optimized implementation of the Whisper model that improving inference speed on CPU. -In this tutorial, a small speech-to-text demo is deployed on Scalingo using a FastAPI backend, a minimal HTML/JavaScript frontend that records audio in the browser, and `faster-whisper` running on CPU in a single web container. +In this tutorial, a small speech to text demo is deployed on Scalingo using a [FastAPI] backend, a Python web framework, a minimal HTML/JavaScript frontend that records audio in the browser, and `faster-whisper` running on CPU in a single web container. -## Planning your deployment +## Planning your Deployment -For this kind of application, it is recommended to start with an M container and move to a larger size if startup time or inference latency becomes an issue. The application warms the model in the background at startup and stores downloaded model files under `/tmp/models`. +For this kind of application, it is recommended to start with an M container and move to a larger size if startup time or inference latency becomes an issue. -The application supports two environment variables: `MODEL_USE`, which defaults to `small`, and `MODEL_CACHE_DIR`, which defaults to `/tmp/models`. Starting with `MODEL_USE=small` is a good default, then moving to a larger model only if better accuracy is required. +The application supports two environment variables: `MODEL_USE` and `MODEL_CACHE_DIR`. A good starting point is to set `MODEL_USE=small` and `MODEL_CACHE_DIR=/tmp/models`, then move to a larger model only if better accuracy is required. You can view the possibles values of `MODEL_USE` on [faster-whisper] repository. -## Deploying the application +## Deploying the Application -### Using the command line +### Using the Command Line 1. Clone the repository: @@ -32,7 +32,7 @@ The application supports two environment variables: `MODEL_USE`, which defaults 2. Create the application on Scalingo: ```bash - scalingo create whisper-speech-to-text + scalingo create mywhisper ``` The Scalingo command line automatically detects the Git repository and @@ -43,15 +43,15 @@ The application supports two environment variables: `MODEL_USE`, which defaults origin https://github.com/Scalingo/whisper-speech-to-text (fetch) origin https://github.com/Scalingo/whisper-speech-to-text (push) - scalingo git@ssh.osc-fr1.scalingo.com:whisper-speech-to-text.git (fetch) - scalingo git@ssh.osc-fr1.scalingo.com:whisper-speech-to-text.git (push) + scalingo git@ssh.osc-fr1.scalingo.com:mywhisper.git (fetch) + scalingo git@ssh.osc-fr1.scalingo.com:mywhisper.git (push) ``` 3. Configure the application: ```bash - scalingo --app whisper-speech-to-text env-set MODEL_USE=small - scalingo --app whisper-speech-to-text env-set MODEL_CACHE_DIR=/tmp/models + scalingo --app mywhisper env-set MODEL_USE=small + scalingo --app mywhisper env-set MODEL_CACHE_DIR=/tmp/models ``` 4. Deploy to Scalingo: @@ -60,46 +60,50 @@ The application supports two environment variables: `MODEL_USE`, which defaults git push scalingo main ``` - Scalingo detects the Python environment, installs the dependencies declared by the project, and starts the application using the `Procfile`. The speech-to-text demo is now deployed. + Scalingo detects the Python environment, installs the dependencies declared by the project, and starts the application using the `Procfile`. The speech to text demo is now deployed. -## Testing the deployment +## Testing the Deployment -Before using the application, check the health endpoint to verify that the model is loaded: +Before using the application, query the health endpoint to check that the model is loaded: ```bash - curl https://whisper-speech-to-text.osc-fr1.scalingo.io/health + curl https://mywhisper.osc-fr1.scalingo.io/health ``` -Once the model is ready, open the application in a browser and test recording from the HTML interface. The transcription endpoint can also be tested directly with `curl`: +Since the model is downloaded the first time the container starts, wait until the `status` field is ready before opening the application in a browser and testing recording from the HTML interface. + +The transcription endpoint can also be tested directly with **curl**.For example, if the audio file is in the current directory of your computer: ```bash - curl -X POST https://whisper-speech-to-text.osc-fr1.scalingo.io/transcribe \ - -F "file=@sample.webm" + curl --request POST https://mywhisper.osc-fr1.scalingo.io/transcribe \ + --form "file=@sample.webm" ``` -The backend writes the uploaded file to `/tmp`, transcribes it, then returns a JSON response containing the transcript and model metadata. +The backend writes the uploaded file to `/tmp`, transcribes it, then returns a JSON response containing the transcript and model metadata. + +In this demo the transcription runs synchronously, but this demo can be adapted to an asynchronous workflow, for example by offloading the transcription to a background job. -## Updating the model +## Updating the Model The application reads the Whisper model name from the `MODEL_USE` environment variable, so changing model size does not require code changes. To switch the deployed application to another model, update the variable from the command line: ```bash - scalingo --app whisper-speech-to-text env-set MODEL_USE=medium + scalingo --app mywhisper env-set MODEL_USE=medium ``` Model names such as `tiny`, `base`, `small`, `medium`, `large-v3`, or `turbo` can be used, depending on the balance required between accuracy, startup time, and CPU usage. -After changing the variable, restart the application so the web process reloads the selected model: +After changing the variable, restart the application so a new container is started with the updated configuration and the selected model is loaded again at startup: ```bash - scalingo --app whisper-speech-to-text restart + scalingo --app mywhisper restart ``` -At the next startup, the application downloads or reloads the selected model into the cache directory and warms it in the background before serving transcription requests. +At the next startup, the application downloads the selected model into the cache directory and warms it in the background before serving transcription requests. -## Updating your application +## Updating your Application To deploy a new version, commit the changes and push again to the Scalingo remote: @@ -109,4 +113,6 @@ To deploy a new version, commit the changes and push again to the Scalingo remot git push scalingo main ``` -If the frontend template, model settings, or Python dependencies change, redeploying is enough for Scalingo to rebuild and restart the application with the new version. +[whisper]: https://github.com/openai/whisper +[faster-whisper]: https://github.com/SYSTRAN/faster-whisper +[fastapi]: https://fastapi.tiangolo.com From 9411c94b2bcec168e512629f83b8723df0cc1a78 Mon Sep 17 00:00:00 2001 From: SC-Samir Date: Thu, 28 May 2026 14:57:26 +0200 Subject: [PATCH 3/6] Solve issue --- src/_tutorials/whisper/index.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/_tutorials/whisper/index.md b/src/_tutorials/whisper/index.md index 78d2c1977..6df08157e 100644 --- a/src/_tutorials/whisper/index.md +++ b/src/_tutorials/whisper/index.md @@ -8,7 +8,7 @@ modified_at: 2026-05-26 [Whisper] is an automatic speech recognition model that converts speech to text. It was trained on a large, multilingual audio corpus, which makes it robust to different accents, background noise, and real-world conditions. As an open source model, it is well suited for developers who want to integrate speech to text without depending entirely on a proprietary API. -Instead of relying on an external SaaS API, Whisper can run directly inside a web application using [faster-whisper], an optimized implementation of the Whisper model that improving inference speed on CPU. +Instead of relying on an external SaaS API, Whisper can run directly inside a web application using [faster-whisper], an optimized implementation of the Whisper model that improves inference speed on CPU. In this tutorial, a small speech to text demo is deployed on Scalingo using a [FastAPI] backend, a Python web framework, a minimal HTML/JavaScript frontend that records audio in the browser, and `faster-whisper` running on CPU in a single web container. @@ -16,7 +16,7 @@ In this tutorial, a small speech to text demo is deployed on Scalingo using a [F For this kind of application, it is recommended to start with an M container and move to a larger size if startup time or inference latency becomes an issue. -The application supports two environment variables: `MODEL_USE` and `MODEL_CACHE_DIR`. A good starting point is to set `MODEL_USE=small` and `MODEL_CACHE_DIR=/tmp/models`, then move to a larger model only if better accuracy is required. You can view the possibles values of `MODEL_USE` on [faster-whisper] repository. +The application supports one environment variables: `MODEL_USE`. A good starting point is to set `MODEL_USE=small`, then move to a larger model only if better accuracy is required. You can view the possibles values of `MODEL_USE` on [faster-whisper] repository. ## Deploying the Application @@ -51,7 +51,6 @@ The application supports two environment variables: `MODEL_USE` and `MODEL_CACHE ```bash scalingo --app mywhisper env-set MODEL_USE=small - scalingo --app mywhisper env-set MODEL_CACHE_DIR=/tmp/models ``` 4. Deploy to Scalingo: @@ -60,7 +59,7 @@ The application supports two environment variables: `MODEL_USE` and `MODEL_CACHE git push scalingo main ``` - Scalingo detects the Python environment, installs the dependencies declared by the project, and starts the application using the `Procfile`. The speech to text demo is now deployed. + Scalingo detects the Python environment, installs the dependencies declared by the project, and starts the application using the [Procfile]. The speech to text demo is now deployed. ## Testing the Deployment @@ -70,9 +69,9 @@ Before using the application, query the health endpoint to check that the model curl https://mywhisper.osc-fr1.scalingo.io/health ``` -Since the model is downloaded the first time the container starts, wait until the `status` field is ready before opening the application in a browser and testing recording from the HTML interface. +Since the model is downloaded the first time the container starts, wait until the `status` field is ready before opening the application in a browser and testing the recording from the HTML interface. -The transcription endpoint can also be tested directly with **curl**.For example, if the audio file is in the current directory of your computer: +The transcription endpoint can also be tested directly with `curl`.For example, if the audio file is in the current directory of your computer: ```bash curl --request POST https://mywhisper.osc-fr1.scalingo.io/transcribe \ @@ -81,7 +80,7 @@ The transcription endpoint can also be tested directly with **curl**.For example The backend writes the uploaded file to `/tmp`, transcribes it, then returns a JSON response containing the transcript and model metadata. -In this demo the transcription runs synchronously, but this demo can be adapted to an asynchronous workflow, for example by offloading the transcription to a background job. +In this demo the transcription runs synchronously. This demo can be adapted to an asynchronous workflow, for example by offloading the transcription to a background job. ## Updating the Model @@ -116,3 +115,4 @@ To deploy a new version, commit the changes and push again to the Scalingo remot [whisper]: https://github.com/openai/whisper [faster-whisper]: https://github.com/SYSTRAN/faster-whisper [fastapi]: https://fastapi.tiangolo.com +[procfile]: {% post_url platform/app/2000-01-01-procfile %} From b95d878285c6c90bf950b3a1a200248cec3be42b Mon Sep 17 00:00:00 2001 From: SC-Samir Date: Fri, 24 Jul 2026 11:26:57 +0200 Subject: [PATCH 4/6] fix francois comment --- src/_tutorials/whisper/index.md | 87 ++++++++++++++++----------------- 1 file changed, 42 insertions(+), 45 deletions(-) diff --git a/src/_tutorials/whisper/index.md b/src/_tutorials/whisper/index.md index 6df08157e..440dfa9be 100644 --- a/src/_tutorials/whisper/index.md +++ b/src/_tutorials/whisper/index.md @@ -1,22 +1,32 @@ --- -title: Building Speech to Text with Whisper +title: Building Speech to Text with OpenAI Whisper logo: openai category: ai permalink: /tutorials/whisper -modified_at: 2026-05-26 +modified_at: 2026-07-24 +kind: demo +last_reviewed_at: 2026-07-24 --- -[Whisper] is an automatic speech recognition model that converts speech to text. It was trained on a large, multilingual audio corpus, which makes it robust to different accents, background noise, and real-world conditions. As an open source model, it is well suited for developers who want to integrate speech to text without depending entirely on a proprietary API. +[Whisper] is a general-purpose Automatic Speech Recognition (ASR) model for converting speech into text. It was trained on a large, multilingual audio corpus, which makes it robust to different accents, background noise, and real-world conditions. As an open source model, it is well suited for developers who want to integrate speech to text without depending entirely on a proprietary Saas or API. -Instead of relying on an external SaaS API, Whisper can run directly inside a web application using [faster-whisper], an optimized implementation of the Whisper model that improves inference speed on CPU. +**[faster-whisper]** is an optimized reimplementation of OpenAI's Whisper model built on the [CTranslate2] inference engine. It delivers the same transcription quality as Whisper while significantly improving inference speed and reducing memory usage, making it well suited for production deployments and resource-constrained environments such as Scalingo. -In this tutorial, a small speech to text demo is deployed on Scalingo using a [FastAPI] backend, a Python web framework, a minimal HTML/JavaScript frontend that records audio in the browser, and `faster-whisper` running on CPU in a single web container. +In this tutorial, we use faster-whisper to create a small speech-to-text app featuring a Python backend as well as a minimal HTTP/Javascript frontend. ## Planning your Deployment -For this kind of application, it is recommended to start with an M container and move to a larger size if startup time or inference latency becomes an issue. +- Whisper is available in several sizes (`tiny`, `small`, `medium`, ...). We recommend to start with the `small` size, and switch for a larger model if accuracy becomes an issue. +- The size of the container mainly depends on the size of the model you wish to use. The table below gives some rough recommendations. Please scale up or down depending on your use case and measured performances: -The application supports one environment variables: `MODEL_USE`. A good starting point is to set `MODEL_USE=small`, then move to a larger model only if better accuracy is required. You can view the possibles values of `MODEL_USE` on [faster-whisper] repository. + | Model Size | Container Size | + | --------- | ------------- | + | tiny | L | + | base | L | + | small | XL or 2XL | + | medium | 3XL | + | large | 3XL | + | turbo | 3XL | ## Deploying the Application @@ -25,14 +35,14 @@ The application supports one environment variables: `MODEL_USE`. A good starting 1. Clone the repository: ```bash - git clone https://github.com/Scalingo/whisper-speech-to-text - cd whisper-speech-to-text + git clone https://github.com/Scalingo/scalingo-labs + cd scalingo-labs/whisper-speech-to-text ``` 2. Create the application on Scalingo: ```bash - scalingo create mywhisper + scalingo create my-whisper ``` The Scalingo command line automatically detects the Git repository and @@ -41,16 +51,16 @@ The application supports one environment variables: `MODEL_USE`. A good starting ```bash git remote -v - origin https://github.com/Scalingo/whisper-speech-to-text (fetch) - origin https://github.com/Scalingo/whisper-speech-to-text (push) - scalingo git@ssh.osc-fr1.scalingo.com:mywhisper.git (fetch) - scalingo git@ssh.osc-fr1.scalingo.com:mywhisper.git (push) + origin https://github.com/Scalingo/scalingo-labs (fetch) + origin https://github.com/Scalingo/scalingo-labs (push) + scalingo git@ssh.osc-fr1.scalingo.com:my-whisper.git (fetch) + scalingo git@ssh.osc-fr1.scalingo.com:my-whisper.git (push) ``` -3. Configure the application: +3. Set the model size to use: ```bash - scalingo --app mywhisper env-set MODEL_USE=small + scalingo --app my-whisper env-set MODEL_SIZE=small ``` 4. Deploy to Scalingo: @@ -63,13 +73,19 @@ The application supports one environment variables: `MODEL_USE`. A good starting ## Testing the Deployment -Before using the application, query the health endpoint to check that the model is loaded: +Since the model is downloaded the first time the container starts, query the `/health` endpoint to check the model status: ```bash curl https://mywhisper.osc-fr1.scalingo.io/health ``` -Since the model is downloaded the first time the container starts, wait until the `status` field is ready before opening the application in a browser and testing the recording from the HTML interface. +The output should look like this: + + ```bash + {"ok":true,"model":"tiny","status":"ready","ready":true} + ``` + +Check that the status field is set to ready before opening the application in a browser and testing the recording from the HTML interface. The transcription endpoint can also be tested directly with `curl`.For example, if the audio file is in the current directory of your computer: @@ -82,37 +98,18 @@ The backend writes the uploaded file to `/tmp`, transcribes it, then returns a J In this demo the transcription runs synchronously. This demo can be adapted to an asynchronous workflow, for example by offloading the transcription to a background job. -## Updating the Model - -The application reads the Whisper model name from the `MODEL_USE` environment variable, so changing model size does not require code changes. - -To switch the deployed application to another model, update the variable from the command line: - - ```bash - scalingo --app mywhisper env-set MODEL_USE=medium - ``` - -Model names such as `tiny`, `base`, `small`, `medium`, `large-v3`, or `turbo` can be used, depending on the balance required between accuracy, startup time, and CPU usage. +## Customizing -After changing the variable, restart the application so a new container is started with the updated configuration and the selected model is loaded again at startup: +### Environment - ```bash - scalingo --app mywhisper restart - ``` - -At the next startup, the application downloads the selected model into the cache directory and warms it in the background before serving transcription requests. - -## Updating your Application - -To deploy a new version, commit the changes and push again to the Scalingo remote: - - ```bash - git add . - git commit -m "Update Whisper demo" - git push scalingo main - ``` +`MODEL_SIZE`: Size of the model to use. Check [Whisper][whisper] documentation for available values. +**Don't forget to adjust the size of your container(s) accordingly.** +Defaults to `small`. +*[ASR]: Automatic Speech Recognition [whisper]: https://github.com/openai/whisper [faster-whisper]: https://github.com/SYSTRAN/faster-whisper [fastapi]: https://fastapi.tiangolo.com +[CTranslate2]: https://github.com/OpenNMT/CTranslate2 + [procfile]: {% post_url platform/app/2000-01-01-procfile %} From 41ffaf62395052dee3b84feb82a635b83b5740a7 Mon Sep 17 00:00:00 2001 From: SC-Samir Date: Fri, 24 Jul 2026 12:04:13 +0200 Subject: [PATCH 5/6] fix format --- src/_tutorials/whisper/index.md | 34 +++++++++++++++++---------------- 1 file changed, 18 insertions(+), 16 deletions(-) diff --git a/src/_tutorials/whisper/index.md b/src/_tutorials/whisper/index.md index 440dfa9be..76ea72b68 100644 --- a/src/_tutorials/whisper/index.md +++ b/src/_tutorials/whisper/index.md @@ -8,7 +8,7 @@ kind: demo last_reviewed_at: 2026-07-24 --- -[Whisper] is a general-purpose Automatic Speech Recognition (ASR) model for converting speech into text. It was trained on a large, multilingual audio corpus, which makes it robust to different accents, background noise, and real-world conditions. As an open source model, it is well suited for developers who want to integrate speech to text without depending entirely on a proprietary Saas or API. +**[Whisper]** is a general-purpose Automatic Speech Recognition (ASR) model for converting speech into text. It was trained on a large, multilingual audio corpus, which makes it robust to different accents, background noise, and real-world conditions. As an open source model, it is well suited for developers who want to integrate speech to text without depending entirely on a proprietary Saas or API. **[faster-whisper]** is an optimized reimplementation of OpenAI's Whisper model built on the [CTranslate2] inference engine. It delivers the same transcription quality as Whisper while significantly improving inference speed and reducing memory usage, making it well suited for production deployments and resource-constrained environments such as Scalingo. @@ -20,7 +20,7 @@ In this tutorial, we use faster-whisper to create a small speech-to-text app fea - The size of the container mainly depends on the size of the model you wish to use. The table below gives some rough recommendations. Please scale up or down depending on your use case and measured performances: | Model Size | Container Size | - | --------- | ------------- | + | ---------: | :------------- | | tiny | L | | base | L | | small | XL or 2XL | @@ -75,24 +75,24 @@ In this tutorial, we use faster-whisper to create a small speech-to-text app fea Since the model is downloaded the first time the container starts, query the `/health` endpoint to check the model status: - ```bash - curl https://mywhisper.osc-fr1.scalingo.io/health - ``` +```bash +curl https://my-whisper.osc-fr1.scalingo.io/health +``` The output should look like this: - ```bash - {"ok":true,"model":"tiny","status":"ready","ready":true} - ``` +```bash +{"ok":true,"model":"tiny","status":"ready","ready":true} +``` Check that the status field is set to ready before opening the application in a browser and testing the recording from the HTML interface. -The transcription endpoint can also be tested directly with `curl`.For example, if the audio file is in the current directory of your computer: +The transcription endpoint can also be tested directly with `curl`. For example, if the audio file is in the current directory of your computer: - ```bash - curl --request POST https://mywhisper.osc-fr1.scalingo.io/transcribe \ - --form "file=@sample.webm" - ``` +```bash +curl --request POST https://my-whisper.osc-fr1.scalingo.io/transcribe \ +--form "file=@sample.webm" +``` The backend writes the uploaded file to `/tmp`, transcribes it, then returns a JSON response containing the transcript and model metadata. @@ -102,9 +102,11 @@ In this demo the transcription runs synchronously. This demo can be adapted to a ### Environment -`MODEL_SIZE`: Size of the model to use. Check [Whisper][whisper] documentation for available values. -**Don't forget to adjust the size of your container(s) accordingly.** -Defaults to `small`. +`MODEL_SIZE` +: Size of the model to use.\\ + Check [Whisper][whisper] documentation for available values.\\ + **Don't forget to adjust the size of your container(s) accordingly.**\\ + Defaults to `small`. *[ASR]: Automatic Speech Recognition [whisper]: https://github.com/openai/whisper From 07cd170a1729b72b930b3d8ce1d03444d2524922 Mon Sep 17 00:00:00 2001 From: "Samir @Devrel" Date: Fri, 24 Jul 2026 16:13:26 +0200 Subject: [PATCH 6/6] Update src/_tutorials/whisper/index.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Étienne M. --- src/_tutorials/whisper/index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/_tutorials/whisper/index.md b/src/_tutorials/whisper/index.md index 76ea72b68..a1cbbebcd 100644 --- a/src/_tutorials/whisper/index.md +++ b/src/_tutorials/whisper/index.md @@ -8,7 +8,7 @@ kind: demo last_reviewed_at: 2026-07-24 --- -**[Whisper]** is a general-purpose Automatic Speech Recognition (ASR) model for converting speech into text. It was trained on a large, multilingual audio corpus, which makes it robust to different accents, background noise, and real-world conditions. As an open source model, it is well suited for developers who want to integrate speech to text without depending entirely on a proprietary Saas or API. +**[Whisper]** is a general-purpose Automatic Speech Recognition (ASR) model for converting speech into text. It was trained on a large, multilingual audio corpus, which makes it robust to different accents, background noise, and real-world conditions. As an open source model, it is well suited for developers who want to integrate speech to text without depending entirely on a proprietary SaaS or API. **[faster-whisper]** is an optimized reimplementation of OpenAI's Whisper model built on the [CTranslate2] inference engine. It delivers the same transcription quality as Whisper while significantly improving inference speed and reducing memory usage, making it well suited for production deployments and resource-constrained environments such as Scalingo.