Enabling the notification feature for OCI Speech service

March 17, 2023 | 8 minute read
Ankit Tyagi
Principal Member Of Technical Staff
Text Size 100%:

Oracle Cloud Infrastructure (OCI) Speech is an AI service that applies automatic speech recognition (ASR) technology to convert media files to readable text that is stored in JSON and SubRip text (SRT) format. You can create a transcription job with the object storage location of media files and Speech processes selected media files asynchronously to generate transcription to your bucket. Speech handles low-fidelity media recordings and transcribes challenging recordings like meetings or call centers calls.

You use Speech AI to run transcription for multiple files, spread out across many jobs simultaneously. It becomes hard to track the status of all the files and know when your transcription is ready to be used. A common request from customers is for a notification when the status of the transcription job changes. Recently, the Speech AI team enabled notifications using the OCI Events service.

In this blog post, we cover how you can be notified about a transcription job’s status using the OCI Events and Notification services, which can generate email notifications based on transcription job status. This event-driven approach allows you to respond to state changes in OCI in real time, removing the need to poll the transcription job status on a predefined schedule.

What is the OCI Events service?

OCI Events enables you to create automation based on the state changes of resources, such as transcription job, Compute instance, and bucket, throughout your tenancy. Use Events to allow your development teams to automatically respond when a resource changes its state.

You might use Events in the following ways:

  • Call an OCI function to attach generated SRT into audio when the transcription job is completed.

  • Convert files of one format to another when files are uploaded to an OCI Object Storage bucket.

  • Send a notification to a DevOps team when a database backup completes.

You can only deliver events to certain OCI services with a rule. Use the following services in actions to create an Event Rule:

For more information on OCI Events, including the supported services and associated events, see the documentation.

Now that we’ve identified the three available options that are triggered by events, let’s dive into these options and identify where to use them.

A graphic depicting the workflow that a notification follows from OCI Speech to third-party services.

When to use each service

OCI Notifications broadcasts messages to one or more consumers using a publish-and-subscribe message pattern. The service can notify downstream systems whenever an event is triggered, an alarm threshold is breached, or someone directly publishes a message to the service. The Notification service currently supports the following subscribers:

  • Email

  • Function (OCI functions as a service (FaaS))

  • HTTPS (Custom URL)

  • PagerDuty

  • SMS

  • Slack

OCI Functions is a managed, serverless and elastic FaaS offering powered by the open source Fn Project that sits on top of the OCI stack. You can use OCI Functions to deploy your code or application, without the administrative overhead of maintaining any infrastructure or operating system software. OCI Functions supports code written in a variety of languages, such as Java, Python, Node, Go, and Ruby. Applications deployed as functions can subsequently be triggered in response to events. For more information about the OCI Functions service, see the documentation.

For our example use case, you can write a function that responds to an event emitted by OCI Speech on completion or failure of transcription job. The completed event also triggers for partially successful jobs.

OCI Streaming provides a fully managed, scalable, and durable storage solution for ingesting continuous, high-volume streams of data. When configured as a destination for OCI Events, you can write messages, such as the creation of a file on Object Storage, to a topic for subsequent consumption. To find out more about the OCI Streaming service, see the documentation.

The Notifications service approach

In this blog, I decided to document the first of these three approaches. To enable email notification for OCI Speech events, follow these steps.

Step 1

Create an OCI notification topic. In the menu, navigate to Developer Services and under Application Integration, select Notifications. The only required input for topic creation is the topic name.

A screenshot of the expanded menu with the links for Developer Services and Notifications underlined in red.

A screenshot of the Create Topic window in the Oracle Cloud Console with the name field filled in.

Step 2

After the topic is created, navigate to the topic details page and create an email subscription. Enter your email to receive notifications.

A screenshot of the Create subscription window with the email blacked out.

A screenshot of the Topic Details page showing the subscription job in a pending state.

After you create the subscription, it goes into a pending state, awaiting confirmation. To activate the notification subscription, check the email account you specified and open the verification email. Click the Confirm subscription verification link for this subscription.

A screenshot of an example subscription confirmation email sent from the Notifications service.

A browser tab opens, confirming that you have subscribed your email account to the topic, Speech_Topic.

A screenshot of the example subscription confirmation screen.

Your verification of the email changes the subscription status from “Pending” to “Active.” Switch back to Oracle Cloud Console window and verify the subscription status changed to “Active.” You might need to refresh your browser.

A screenshot of the Topic Details page for Speech_Topic showing an active subscription.

Step 3

You’re now subscribed to a Notifications topic. Next, define an event with conditions that, when met, publishes messages to this Notifications topic. Let's define an event that triggers an email notification when the job status changes in OCI Speech.

From the main menu, select Observability & Management and then Rules.

A screenshot of the expanded menu in the Console with the options for Observability & Management and Rules underlined in red.

Click Create Rule and fill out the following details:

A screenshot of the rules in a compartment.

  • Display name: Provide a name, such as the event type.

  • Description: Provide a description.

  • Rule condition: Event type

  • Service name: AI Services - Speech

  • Event type: Speech – CompletedTranscriptionJob, Speech-FailedTranscriptionJob

  • Action type: Notifications

  • Notifications compartment: Choose your compartment.

  • Topic: Choose the topic created earlier, Speech_Topic.

Click Create Rule.

A screenshot of the Create Rule pafe showing detail fields filled in.

You’ve successfully configured a notification and tied an event to it with a specific compartment. When a job status changes in OCI Speech, an email notification is sent to the email address specified.

Step 4

Trigger the event. Now create a job from OCI Speech to trigger the notification email.

In main menu, navigate to Analytics & AI, AI Services, and then OCI Speech. Click Create job.

A screenshot of the expanded menu in the Console with the options for Analytics & AI and Speech underlined in red.

Fill in the basic job information details and click Next.

A screenshot of the Create Job window showing the details for a transcription job.

Choose one or more media files to generate transcription and click Submit.

A screenshot of the options for selectable files to attached to a job.

Wait for the job to change state to “Succeeded.”

A screenshot of the Speech_Job details page showing the successful subscription.

Check the email account you specified to verify that a notification email was sent. Go to the specified email account and verify that a notification of the job status has been sent.

A screenshot of the email notification for the successful job.


In this blog, we explored using the OCI Notifications service to trigger an email when a Speech job’s state change. This event-driven approach allows other OCI services to react to events as they happen within OCI Speech. With this pattern, you no longer need to poll for job statuses using a predefined schedule. This feature can enable automation for you and provide tools to integrate OCI Speech seamlessly into your enterprise solutions.

We hope that this blog helps as you learn more about Oracle Cloud Infrastructure Speech.

For more information, see the following resources:

Ankit Tyagi

Principal Member Of Technical Staff

Ankit Tyagi is Principal Member of Technical Staff for Oracle and engineering Lead for OCI Speech. He has experience in product development, cloud and AI. In 2018, Ankit joined the Oracle Cloud Infrastructure AI team.

Previous Post

What is synthetic data?

Bob Peulen | 5 min read

Next Post

Deploying custom containers and NVIDIA Triton Inference Server in OCI Data Science

Tzvi Keisar | 5 min read