Play
Play an audio file to the caller.
Play an audio file to the caller.
play plays an audio file to the caller.
| Parameter | Type | Required | Description |
|---|---|---|---|
url | string | Yes | HTTPS link to a WAV or MP3 file. Sautikit must be able to fetch it without signing in. |
loop | integer | No | How many times to repeat. 0 or omitted means once. |
import { sauti } from "@sautikit/node";
res.json(sauti.play("https://cdn.example.com/audio/confirmation.wav"));{
"actions": [
{
"play": {
"url": "https://cdn.example.com/audio/confirmation.wav"
}
}
]
}<Play>https://cdn.example.com/audio/confirmation.wav</Play>