use Twilio\Twiml; $response = new Twiml(); $response->addSpeak('Hello, how can I assist you today?'); echo $response;
use Nexmo\Response; $response = new Response(); $response->addSpeak('Welcome to our app. Please select from the following options:'); echo $response->toXml();This code snippet creates a new Nexmo response which includes an SSML speaking prompt that will be read back to the user via text-to-speech synthesis. The toXml method is used to convert the response to XML format before it is sent back to the user.