Skip to main content

Text to Speech

To perform text-to-speech during a call in PCMO, you can use the speak() method from the PiopiyAction class. This method converts the provided text into speech and plays it during the call.

speak(text)
parameterTypeDescription
textstringThe text to convert to speech

Example Implementation

  • The following code demonstrates how to convert text to speech and play it during a call:
const { PiopiyAction } = require("piopiy");

const action = new PiopiyAction();

action.speak("Hello, Welcome to Telecmi")