Skip to main content

Starter Guide to Corti's API

This guide will get you setup with Corti's API

Updated this week

Welcome to Corti! This three setup guide will help you get familiar with different areas of Corti's API. We recommend having our documentation open in another tab as you walkthrough these steps. You can also use the AI assistant on the bottom left of this page. It is trained on our documentation, but you can also use it to ask to speak to a person. We are happy to help if you have any questions.

Prerequisites

  • Access to API Platform/Client Tools including:

    • Postman

    • Python 3.9+ with websockets installed (pip install websockets)

Step 1: Console Studio

AI Studio is your in-browser playground for testing speech recognition (and soon, text generation) within your project with no code required.

Before initializing your recording: Right click on the transcription area, and click 'Inspect' to open your browser's console in developer tools to see how the data is sent and received when transcribing.

Note the websocket initialization and the various pieces of the transcript as the audio is processed.

Utilizing Studio will require the use of credits associated with your Project

Configure speech recognition

These configuration options should be set before starting the recording. Explore the different options to see how each affects the produced transcription.

Primary Language
Choose the language the model should expect (e.g., en – English). Pick the language that matches your audio for best accuracy.

Interim Results
Toggle to see partial (real-time) hypotheses as speech is processed, simulating a live “typing” effect. The interim results will appear light gray while the final results will be black text.

Spoken Punctuation
When enabled, spoken words like “comma” or “period” are interpreted as punctuation rather than literal words.

Automatic Punctuation
Allow the model to insert punctuation automatically based on prosody and context. Use with Spoken Punctuation disabled if you want fully hands-free punctuation.

Commands
Define voice commands that trigger structured actions.

You will see the commands appear below the transcript, but they will not effect the text in the studio demo.

To Create a Command:

  • Click Add Command

  • Enter the required information:


    • Command ID: The name of your command (e.g., next_section)

    • Phrases that will be spoken by the user (e.g., “next section”, “go to next section”)

    • Optional Variables: place holders that allow a user to use specific values when utilizing voice commands (e.g., {template-name} used in phrase "insert my {template-name} template")

    • Click 'Add Command' to complete the creation process

Step 2: Postman Collection

Download the Postman collection at the bottom of of this page. This will allow you to explore our REST API using pre-recorded, asynchronous, audio. We have included an example file below for your use.


Authentication Setup Instructions

  1. Open the Collection Variables

    • In Postman, click on your collection name.

    • Go to the Variables tab.

    • Set up the following Variables

      • token

      • client-id

      • environment

      • Tenant-Name

      • client-secret

      • baseURL

  2. Fill in your variable values

    • Locate the variables for authentication (e.g., baseURL, client-id, client-secret, environment, Tenant-Name).

    • Fill in your credentials from your Console API Key.

    • Your baseURL will be https://api.{{environment}}.corti.app/v2

  3. Get Your Access Token

    • Navigate to the Auth tab

    • Set the Authentication Type to OAuth 2.0

    • Configure New Token (This section should appear as shown below)



    • Run "Get New Access Token" at the bottom of the page.

    • This will automatically store the token in the collection variables for use in other requests

  4. Save the Token

    • Click use token on the pop-up modal. This will save the token for future requests. It will be refreshed in the background when a new request is made.

You will find your environment and tenant in the 'API Client' created within your Console.


Explore our REST API

Our recommended starter course is:

  1. Creating an Interaction (Be sure to save the interaction ID in an associated variable)

  2. Upload a recording to the interaction (Copy the recording ID)

  3. Create a transcript

  4. Generate a document from the string of the transcript

Once you are comfortable with this process, explore the other parts of the collection and our API.

Step 3: Open a WebSocket in Python to Stream Audio

You can download the Python example below and view the video guide to get started.

Did this answer your question?