Play Music
The play action will play the audio file to the caller, by greeting the caller with specific pre-recorded music or playing the music while the caller is on hold. PIOPIY supports both mp3 and wav file formats.
- Node.js
- Python
To play an audio file or URL during a call using the PIOPIY PCMO platform, you can use the playMusic
method of the StreamAction
class. The playMusic
method takes an audio file or a URL and plays it during an active call.
const { StreamAction } = require("piopiy");
const stream = new StreamAction();
stream.playMusic("https://example.com/your_music_file.wav");
Parameters type and description
Parameter | Type | Description |
---|---|---|
music_file | string | The music file or music file URL of the music file to be played. |
To play an audio file or URL during a call using the PIOPIY PCMO platform, you can use the playMusic
method of the StreamAction
class. The playMusic
method takes an audio file or a URL and plays it during an active call.
from piopiy import StreamAction
stream = StreamAction()
stream.playMusic("https://example.com/your_music_file.wav")
Parameters type and description
Parameter | Type | Description |
---|---|---|
music_file | string | The music file or music file URL of the music file to be played. |