SDK: Communication Methods

The Autoscriber SDK supports the following communication methods:

Get

This is the simplest option but not recommended as you won't get any real-time results.

JSON Request:

{
    ... rest of body
    "communication": {
        "method": "get"
    }
}

Response 201:

    {
        "id": "<RANDOM ID>",
        "location": "https://io.autoscriber.com/v1/scribe/<RANDOM ID>"
    }

Socket.io

This will set up a socket connection for you to send your audio over and it will return resuls in real-time.

JSON Request:

{
    ... rest of body
    "communication": {
        "method": "socketio"
    }
}

Response 200:

    {
        "id": "<RANDOM ID>",
        "location": "https://io.autoscriber.com/v1/scribe/<RANDOM ID>",
        "endpoint": "https://autoscriber.webpubsub.azure.com",
        "path": "/clients/socketio/hubs/autoscriber-api",
        "token": "eyJhbGci..."
    }

SSE

Using server-sent events the response with contain a keep-alive header and sends back results in real-time.

JSON Request:

{
    ... rest of body
    "communication": {
        "method": "sse"
    }
}

Response 201:

    {
        "id": "<RANDOM ID>",
        "location": "https://io.autoscriber.com/v1/scribe/<RANDOM ID>"
    }

Webhook

You provide a webhook which we'll call (in real-time) with the results. This does require that you have an endpoint that is available over the internet.

JSON Request:

{
    ... rest of body
    "communication": {
        "method": "webhook",
        "webhook": {
            "url": "https://YOUR_ENDPOINT",
            "headers": {"Authorization": "Basic ..."}
        }
    }
}

Response 201:

    {
        "id": "<RANDOM ID>"
    }
Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.

Still need help? Contact Us Contact Us