# Asynchronous conversion

> **Applications**: Google Speech-to-Text, Microsoft OneDrive, Google Cloud Platform

**Applications**: Google Speech-to-Text, Microsoft OneDrive, Google Cloud Platform

**Description**: Convert an audio file to text using Google Speech-to-Text.

## Workflow

1. Let's say the audio file you want to convert is uploaded to a Microsoft OneDrive & SharePoint folder. Therefore, you can start your process with a [File Created](https://docs.uipath.com/activities/other/latest/productivity/office365-trigger-new-file-created) trigger.

   ![docs image](https://dev-assets.cms.uipath.com/assets/images/activities/latest-docs-image-435840-f32bb734-04bc8f2a.webp)

   :::note
   You can retrieve files from any source, such as Google Drive, Box, Dropbox etc.
   :::
2. Next, use a Google Cloud Platform [Get Bucket](https://docs.uipath.com/activities/other/latest/it-automation/gcp-get-bucket) activity. This retrieves the details for the bucket where you can then upload the audio file.

   ![docs image](https://dev-assets.cms.uipath.com/assets/images/activities/latest-docs-image-435696-188510a5-828e482b.webp)
3. Add a Google Cloud Platform [Upload Object from File](https://docs.uipath.com/activities/other/latest/it-automation/gcp-upload-object) activity to upload the audio file (retrieved from the trigger's output) to the bucket.
4. Next, add a [Get Object](https://docs.uipath.com/activities/other/latest/it-automation/gcp-get-object) activity. You now use the **Bucket** and **Object name** fields to construct the Google Cloud Storage URI which you'll use in the following activity.

   This URI should start with `gs://`.

   ![docs image](https://dev-assets.cms.uipath.com/assets/images/activities/latest-docs-image-435691-12b26a41-e3584e0a.webp)

5. Add a [Convert Speech to Text Asynchronously](https://docs.uipath.com/activities/other/latest/integration-service/uipath-google-speechtotext-convert-speech-to-text-asynchronously) activity.

   This activity outputs a **Job ID** which you will use in a later step.

   ![docs image](https://dev-assets.cms.uipath.com/assets/images/activities/latest-docs-image-435701-f429e9b3-7936a398.webp)

6. Add a [Do While](https://docs.uipath.com/activities/other/latest/workflow/interruptible-do-while) activity and set the following condition: `Status<>"success"` (i.e., status is not "success").

   ![docs image](https://dev-assets.cms.uipath.com/assets/images/activities/latest-docs-image-435706-f78392e6-fe4fa792.webp)

   1. Inside the **Do While,** add a [Delay](https://docs.uipath.com/activities/other/latest/workflow/delay) activity to regularly check if the job has been performed successfully, or failed, or is pending.
   2. Add a [Get Conversion Status by Job ID](https://docs.uipath.com/activities/other/latest/integration-service/uipath-google-speechtotext-get-conversion-status-by-job-id) and input the **job ID** you retrieved from the output of [Convert Speech to Text Asynchronously](https://docs.uipath.com/activities/other/latest/integration-service/uipath-google-speechtotext-convert-speech-to-text-asynchronously).

      Because you are using a ten-second delay, this means every ten seconds Studio checks the job status.
   3. Add a [Write Line](https://docs.uipath.com/activities/other/latest/workflow/write-line) activity to register the status from [Get Conversion Status by Job ID](https://docs.uipath.com/activities/other/latest/integration-service/uipath-google-speechtotext-get-conversion-status-by-job-id). Once the status is received as "success", the workflow moves on to the next step.
   4. Add a [Get Converted Text by Job ID](https://docs.uipath.com/activities/other/latest/integration-service/uipath-google-speechtotext-get-converted-text-by-job-id) activity and input the same job ID retrieved from the output of [Convert Speech to Text Asynchronously](https://docs.uipath.com/activities/other/latest/integration-service/uipath-google-speechtotext-convert-speech-to-text-asynchronously).

      ![docs image](https://dev-assets.cms.uipath.com/assets/images/activities/latest-docs-image-435711-e61f7f58-b63e7602.webp)

   5. Add a [Write Line](https://docs.uipath.com/activities/other/latest/workflow/write-line) to output the text retrieved using [Get Converted Text by Job ID](https://docs.uipath.com/activities/other/latest/integration-service/uipath-google-speechtotext-get-converted-text-by-job-id).

      ![This example shows how the status changes and the text is retrieved using Write Line.](https://dev-assets.cms.uipath.com/assets/images/activities/latest-this-example-shows-how-the-status-changes-and-the-text-is-retrieved-using-write-line-435716-c3f13455-3d45bac2.webp)
