AssemblyAI Go SDK

A Go client library for accessing AssemblyAI.

Quickstart

Installation

$go get github.com/AssemblyAI/assemblyai-go-sdk

Tips and tricks

Inspect API errors

If you receive an API error, you can inspect the HTTP response returned by the API for more details:

1transcript, err := client.Transcripts.TranscribeFromURL(ctx, audioURL, nil)
2if err != nil {
3 var apierr aai.APIError
4 if errors.As(err, &apierr) {
5 // apierr.Response is the *http.Response from the API call.
6 fmt.Println(apierr.Response.StatusCode)
7 } else {
8 // err is not an API error.
9 }
10}