# 5 minute challenge: summarize audio

This guide will show you how to swiftly build from scratch a workflow that transcribes and summarizes audio recordings

1. Go to <https://app.scade.pro/flow/> and click the **New flow** button and then choose **Start with blank**

<figure><img src="/files/ODg0A65mm66xkU9AHax3" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/2lMKrPqz86uYtYOmARTg" alt=""><figcaption></figcaption></figure>

2. There will already be **Start** end **End** nodes on the canvas. Place everything else between them.\
   \
   Go to the **Settings** of the **Start Node Form** and click **Configure fields** to start adding your data

<figure><img src="/files/IthWwqgy09dgn7XmllLf" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/mIslVxzx4XUp4XBX1N7Z" alt=""><figcaption></figcaption></figure>

3. Add one field, call it, for example, `audio`, and change the input type to `String/URI` to make it suitable for storing files. Click **Save**

<figure><img src="/files/7LnKc0P1DWnAGhP4cZeT" alt=""><figcaption></figcaption></figure>

4. You can upload the audio file from your computer or, alternatively, use the **Set url** button if you have a link to the file. \
   \
   We'll use Carl Sagan's "The pale blue dot" speech as an example file. Here's the link: <https://tile.loc.gov/storage-services/media/ls/sagan/1958124-3-1.mp3>

<figure><img src="/files/Jz8kPMUrT2XVJdMNbh1s" alt=""><figcaption></figcaption></figure>

5. Hit the **Execute** button and then click **Save and execute** to run this node and generate the output. We need it to move further.

<figure><img src="/files/Kp13C186OfHuMYqmJGaU" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/dPvOngE1np2i41cFMIjo" alt=""><figcaption></figcaption></figure>

6. Use the search panel on the left to find a processor that transcribes audio. If you already know the name of your desired processor, type it. Alternatively, you can type what you want to do — like `audio to text` there and pick by the name and description.\
   \
   **whisperx-a40-large** looks promising, drag it to the canvas

<figure><img src="/files/8EvManYitgWUS0oWIfRu" alt=""><figcaption></figcaption></figure>

7. Connect the `audio` output of the **Start** node with the input of the **whisperx** node and click the **Execute** button on the latter. It will take a while to transcribe an audio file

<figure><img src="/files/cEczP8TXTZkelsj2YKss" alt=""><figcaption></figcaption></figure>

8. Drag the **ChatGPT** processor to your canvas, connect the output of the **whisperx** with the **ChatGPT's** input and go to the settings of the latter. Review the instructions in paragraphs 6-8 if needed. You can move your nodes around whatever you like to create a convinient workspace

<figure><img src="/files/r6qLG7EJXKYBAS8YE4D3" alt=""><figcaption></figcaption></figure>

&#x20;

Locate the **Messages** section in the settings and click the pencil to add instructions for the **ChatGPT**

<figure><img src="/files/h7EIus1PJWGMak80DZxY" alt=""><figcaption></figcaption></figure>

9. Click **Add message**. \
   \
   Change the type of the message to `System` as recommended by OpenAI to emphasize that it's a high-level instruction and to guide the model's behaviour

<figure><img src="/files/CuUztbr5N2ivUg0cqgXy" alt=""><figcaption></figcaption></figure>

The prompt here is rather straightforward: `summarize a following audio transcript`

<figure><img src="/files/Vn6UtEWlTTAHY943InuV" alt=""><figcaption></figcaption></figure>

10. Add another message and click the **#** symbol. The **Expression editor** will open. In case of the **ChatGPT** node we need it to get data from other nodes

<figure><img src="/files/ithfsPsclqLzUqSemhvt" alt=""><figcaption></figcaption></figure>

There is a list of the nodes on the left. Click on the **whisprex-a40-large** to see its output data. Keep going until you end up with `segments` — that's where the transcription is stored.\
\
Drag the `segments` to the expression field

<figure><img src="/files/2IEJxZu8eeYLQ8xYIsTY" alt=""><figcaption></figcaption></figure>

The result should look similar to this. Don't forget to click the **Save** buttons in the **Expression editor** and before closing the node settings.

<figure><img src="/files/qrPMyIJ5wQOAWdOlXtBT" alt=""><figcaption></figcaption></figure>

Click the **Execute** button on the **ChatGPT** node after you set everything

11. In principle, you are good to go now: the **ChatGPT** node generates summary, and you can copy and use it. But let's do some housekeeping to make sure that this workflow will be reusable and suitable to API integrations.\
    \
    Open settings of the **End Node Form**

<figure><img src="/files/55VwpFRGSzuxgQ4WbLNg" alt=""><figcaption></figcaption></figure>

Add a field and name it, there's no need to change the field type now

<figure><img src="/files/zGTVhk6FsbPftXek8gve" alt=""><figcaption></figcaption></figure>

Connect the `success` output of the **ChatGPT** node with the newly generated input of the **End** node and execute the **End** node

<figure><img src="/files/g6P7qL17aAgRhrgCFo2w" alt=""><figcaption></figcaption></figure>

12. Now you have your result in the **End** node. Why it's important? We'll cover this later\
    \
    If you hover the text you'll see the button to copy and take it elsewhere

<figure><img src="/files/HbjAwKXl8Ae9dRHyGmmo" alt=""><figcaption></figcaption></figure>

13. Once you have the workflow built, there's no need to run nodes one by one anymore. Simply change the file in the **Start** node and use the **Play** button on the top panel to launch the entire workflow.

<figure><img src="/files/jk3aOUi2DI0or96bxdY5" alt=""><figcaption></figcaption></figure>

14. And one last thing. It's a good idea to give your workflow a comprehensive name.\
    \
    Locate the **cog** in the top bar, fill in the suitable **Flow name** and click **Submit**

<figure><img src="/files/yHwkMOJ49b2DMgDpGSKl" alt=""><figcaption></figcaption></figure>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://scade.gitbook.io/scade-knowledge-base/flow-examples/5-minute-challenge-summarize-audio.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
