# Transcribe audio in batches with a workflow

MOI provides an audio transcription workflow template that converts multiple audio files into searchable text in a batch. The template handles audio input, speech recognition, and transcription output, making it suitable for turning project meetings, customer feedback, and interview recordings into text in one run.

This tutorial uses 3 Chinese sample recordings to demonstrate batch audio transcription with the **Speech Transcription Q&A** template. The samples simulate a project weekly meeting, customer feedback, and a product interview, so you can compare transcription results for different types of content in the same workflow. The tutorial takes approximately 15 minutes; actual processing time depends on the audio duration and model speed.

Screenshots use the Chinese interface. The downloadable sample recordings remain in Chinese and retain their original filenames.

## What You Will Accomplish

- Download and extract 3 sample audio recordings.
- Import multiple audio files into Catalog in a batch.
- Create an audio transcription workflow from a system template.
- Run the workflow once to generate the corresponding transcripts.
- View and download the transcription results in Catalog.

## Before You Begin

- Have an MOI account. You can [sign in or register for MOI Cloud](https://moi.matrixorigin.cn/).
- Confirm that you can create and run workflows in the current workspace.
- Download the [audio transcription tutorial sample package](../assets/downloads/moi-audio-transcription-demo.zip) and extract the 3 MP3 files.

The package contains Chinese sample recordings created for this tutorial:

| File | Content |
| --- | --- |
| `project-weekly-meeting.mp3` | A project weekly meeting summary covering progress, plans, and collaboration tasks |
| `customer-feedback.mp3` | Customer feedback covering observed issues, expectations, and suggestions for improvement |
| `product-interview.mp3` | A product interview summary covering feature preferences and transcription requirements |

## Steps

### 1. Import Audio into Catalog in a Batch

1. Sign in to MOI and select **Import Tasks** under **Data Connect** in the left navigation.
2. Click **New Import Task**, then select **Unstructured** and **Local Upload**.
3. Select all 3 extracted MP3 files at once.
4. Set the target location under the current workspace's Catalog to:

   ```text
   tutorial_data / audio_transcription / source
   ```

   If the path does not exist, create each level while selecting the target location.

5. Keep the remaining import parameters at their defaults and click **Create and Start Import**.
6. Wait for the import task to finish and confirm that all 3 MP3 files appear in the `source` data volume.

   ```{image} ../assets/images/tutorials/workflow-audio-transcription-upload.png
   :alt: Select three MP3 audio files under Local Upload and set the Catalog data source
   ```

   Wait until the import task list shows a status of **Completed** before creating the workflow.

   ```{image} ../assets/images/tutorials/workflow-audio-transcription-import-completed.png
   :alt: The audio import task list shows that the task is completed
   ```

### 2. Create an Audio Transcription Workflow

1. Select **Workflow** under **Data Processing** in the left navigation.
2. Click **Create Workflow**.
3. Select the **Speech Transcription Q&A** template and click **Use Template**.

   ```{image} ../assets/images/tutorials/workflow-audio-transcription-select-template.png
   :alt: Select the Speech Transcription Q&A workflow template
   ```

4. Enter `audio_transcription_demo` as the workflow name.

The template already includes nodes for reading audio, transcribing speech, and writing results, so you do not need to build the processing sequence manually.

### 3. Configure Run Parameters

1. Open the workflow's run configuration. In the template's **Source Files** or **Data Source** parameter, select:

   ```text
   tutorial_data / audio_transcription / source
   ```

   ```{image} ../assets/images/tutorials/workflow-audio-transcription-run-config.png
   :alt: Audio dataset in the Speech Transcription Q&A workflow run configuration
   ```

2. Set the file scope to **By File** and select `project-weekly-meeting.mp3`, `customer-feedback.mp3`, and `product-interview.mp3`.
3. Select **Embed and Add to Knowledge Base** on the left. Under **Target Knowledge Base**, click **New Knowledge Base**, enter `audio_transcription_knowledge` as the name, then finish creating and select the knowledge base.

   ```{image} ../assets/images/tutorials/workflow-audio-transcription-knowledge-base.png
   :alt: Select the target knowledge base in the speech transcription workflow
   ```

4. Select **Save to MOI Volume** on the left. Set **Catalog Save Location** to `tutorial_data / audio_transcription / output` to store ZIP archives of the transcript segments.

   ```{image} ../assets/images/tutorials/workflow-audio-transcription-save-catalog.png
   :alt: Set the Catalog save location for speech transcription results
   ```

5. Keep the compute resources, transcription language, and other settings at their defaults, then click **Confirm** to save the run configuration.

### 4. Save and Run the Workflow

1. Return to the workflow canvas and click **Save and Enable**.
2. Click **Run** and confirm that this run includes all 3 audio files.
3. Click **Jobs** on the right side of the workflow page and wait for this run to finish in the job list.

   ```{image} ../assets/images/tutorials/workflow-audio-transcription-job-completed.png
   :alt: The job list shows a Completed run status for audio_transcription_demo
   ```

The workflow processes the 3 audio files in sequence using the same transcription configuration and generates a corresponding transcript for each input file.

### 5. Ask Questions in the Knowledge Base

1. Wait for the workflow to finish and confirm that the target knowledge base has finished processing the materials.
2. Go to **Resource Center > Knowledge Base** in the left navigation, open `audio_transcription_knowledge`, and click **Chat**.

   ```{image} ../assets/images/tutorials/workflow-audio-transcription-knowledge-chat-entry.png
   :alt: Open audio_transcription_knowledge in the knowledge base list and click Chat
   ```

3. Send a question, for example: `Summarize the main issues and action items mentioned in the three recordings.`
4. Review the answer and cited sources returned by the knowledge base. To view the original transcription results, go to `tutorial_data / audio_transcription / output` in **Catalog** and open or download the corresponding ZIP file.

   ```{image} ../assets/images/tutorials/workflow-audio-transcription-answer.png
   :alt: The knowledge base returns a summary and action items based on the transcripts of the three audio files
   ```

## Tutorial Complete

You have used the **Speech Transcription Q&A** workflow template to process 3 audio files in a batch, write their transcripts to a knowledge base, and ask questions about them. You can now replace the samples with your own meeting, interview, or customer service recordings and reuse the same workflow configuration for batch transcription and Q&A.
