Transcribe audio with a Parakeet endpoint
Get a transcription from a Parakeet endpoint with the CosmicAC CLI or curl.
Get a transcription from a Parakeet endpoint. Use the CosmicAC CLI with an audio URL, or use curl with a local file or a URL.
Prerequisites
Before you start, make sure that you have the following.
- A running Parakeet Managed Inference Job with a serving endpoint. See Create a Parakeet Managed Inference Job with the CLI.
- Your API key. See Create an API key with the CLI.
- Audio to transcribe. The CLI accepts a hosted URL, and curl accepts a local file or a URL.
- The CosmicAC CLI installed and configured. See Install the CLI.
Steps
Find your endpoint name
List your endpoints.
cosmicac models statsEach endpoint appears as Endpoint: <endpoint-name>. Copy the name of your Parakeet endpoint.
Send the transcription
To authenticate, send your API key with each request.
- CLI: answer yes to the API key prompt.
- curl: send the key as a bearer token in the
Authorizationheader.
Start an interactive transcription session.
cosmicac inference transcribeAnswer the prompts, and then enter an audio file URL.
The cosmicac inference transcribe session asks for the following values.
- Use an API key: answer yes to authenticate, and then enter the key at the masked prompt. If the
COSMIC_API_KEYenvironment variable is set, the CLI uses that key and doesn't ask. - Endpoint ID: the endpoint name from the previous step.
- Audio file URL: the URL of the audio file to transcribe.
After each transcription, the command asks for the next audio file URL. Press Ctrl+C to exit.
Help and troubleshooting
The CLI shows "The inference proxy rejected this API key."
The CLI checks your API key before the transcription session starts, and the inference proxy rejected it. Check that the key is current.
cosmicac api-keys listIf the key was revoked, create a new one. See Create an API key with the CLI.