Get Started with Rev AI's European Union Deployment
By Vikram Vaswani, Developer Advocate - Aug 24, 2022
Introduction
Rev AI's services are already compliant with best practices for maintaining customer security and privacy. In addition to this, Rev AI offers an European Union (EU) deployment and an EU data processing center in Frankfurt, Germany for customers with EU-specific data processing and storage requirements.
There are a number of important differences between Rev AI's EU and US deployments. This tutorial explains these differences and demonstrates how to submit asynchronous jobs and receive transcripts in the EU region.
Assumptions
attention
Rev AI customers who operate in both US and EU regions will need to have two accounts (one for each region) to submit jobs. To obtain an account for the EU region, write to support@rev.ai or contact your Customer Success Manager (CSM).
This tutorial assumes that:
- You have a Rev AI account in the EU region and access token. If not, sign up for a free account and generate an access token .
- You have an audio file to transcribe. If not, use this example audio file from Rev AI .
Region-specific limitations
At the time of writing, only the Asynchronous Speech-to-Text API is available in the EU region. For developers, the primary change required when using or migrating to this API in the EU region will be to modify the base API endpoint in their applications to https://ec1.api.rev.ai/speechtotext/v1
.
In addition to having access to only the Asynchronous Speech-to-Text API in the EU region, developers must keep the following additional limitations in mind for this API:
- Human transcription is not supported.
-
Custom vocabularies
can be supplied only at job submission time via the
custom_vocabularies
option. Using pre-existing user-defined custom vocabularies via thecustom_vocabulary_id
option is not supported.
warning
Job requests to other APIs or containing unsupported parameters will result in 404
error responses until these features become available.
Step 1: Submit a file for transcription
In order to see how this works, submit an audio file for transcription to Rev AI in the EU region using the command below. Replace the <REVAI_ACCESS_TOKEN>
placeholder with your Rev AI access token, and replace the sample file URL shown below with the URL to your own audio file if required.
curl -X POST "https://ec1.api.rev.ai/speechtotext/v1/jobs" \
-H "Authorization: Bearer <REVAI_ACCESS_TOKEN>" \
-H "Content-Type: application/json" \
-d '{"source_config": {"url": "https://www.rev.ai/FTC_Sample_1.mp3"},"metadata":"This is a test"}'
You'll receive a response like this:
{
"id": "Hmx8c6F7pJ8r",
"created_on": "2022-07-28T05:14:38.13",
"name": "FTC_Sample_1.mp3",
"metadata": "This is a test",
"status": "in_progress",
"type": "async",
"language": "en"
}
The id
(in this case Hmx8c6F7pJ8r
) will enable you to retrieve your transcript.
Step 2: Retrieve the transcript
You now need to wait for the job to complete. Wait for approximately 1 minute and then check the status
of your job by querying the API as shown below:
curl -X GET https://ec1.api.rev.ai/speechtotext/v1/jobs/<ID> \
-H "Authorization: Bearer <REVAI_ACCESS_TOKEN>"
warning
Polling the API periodically for job status is NOT recommended in a production server. Rather, use webhooks to asynchronously receive notifications once the transcription job completes.
Once a transcription job's status
changes to transcribed
, you can retrieve the transcript in JSON format by running the command below. As before, replace the <REVAI_ACCESS_TOKEN>
placeholder with the access token. You must also replace the <ID>
placeholder with the id
obtained in Step 1.
curl -X GET "https://ec1.api.rev.ai/speechtotext/v1/jobs/<ID>/transcript" \
-H "Authorization: Bearer <REVAI_ACCESS_TOKEN>" \
-H "Accept: application/vnd.rev.transcript.v1.0+json"
Here is an example of the output:
{
"monologues": [
{
"speaker": 1,
"elements": [
{
"type": "text",
"value": "Hi",
"ts": 0.27,
"end_ts": 0.32,
"confidence": 1
},
{
"type": "punct",
"value": ","
},
{
"type": "punct",
"value": " "
},
{
"type": "text",
"value": "my",
"ts": 0.35,
"end_ts": 0.46,
"confidence": 1
},
{
"type": "punct",
"value": " "
},
{
"type": "text",
"value": "name's",
"ts": 0.47,
"end_ts": 0.59,
"confidence": 1
},
{
...
}
]
},
{
...
}
]
}
Alternatively, you can get the plaintext version by running the command below:
curl -X GET "https://ec1.api.rev.ai/speechtotext/v1/jobs/<ID>/transcript" \
-H "Authorization: Bearer <REVAI_ACCESS_TOKEN>" \
-H "Accept: text/plain"
Next steps
Rev AI's EU deployment enables companies to operate in accordance with EU GDPR policies and ensure that data is processed in accordance with EU regulations. Developers wishing to migrate to the EU deployment must take into account key differences between Rev AI's EU and US deployments and adapt their migration plan accordingly.
Learn more about Rev AI's EU deployment by visiting the following links:
- Documentation: Rev AI's GDPR-compliant Data Processing Addendum
- Documentation: Data residency and delineation maintenance between US and EU accounts
- Blog post: Rev AI Expands Its Presence in the European Union