Use the Ruby SDK with Paraformer to submit an accessible recording URL for asynchronous transcription.
Prerequisites
Install the Ruby SDK and configure your API key. Replace WorkspaceId with your workspace ID in China (Beijing) and use an API key from the same region.
Quick start
Save the example as example.rb and run ruby example.rb '<recording URL>'.
SDK reference
| Option | Description |
|---|---|
url | HTTPS endpoint for asynchronous file transcription. |
model, file_urls | Model ID and recording URLs in the request. |
poll_interval, completion_timeout, http_timeout | Polling interval, task wait limit, and HTTP timeout in seconds. |
diarization_enabled, speaker_count | Enable diarization or set the speaker count when supported by the model. |
transcribe once to submit the task, poll its status, and download successful results. To retain the task ID or handle failed subtasks separately, use submit, wait_completion, and download.
Pass URLs the service can access in file_urls. Set poll_interval and completion_timeout to control polling and the wait limit. Download results promptly because their URLs expire.