Home >Backend Development >PHP Tutorial >javascript - Speech synthesis real-time playback problem
Make a voice broadcast of passenger shuttle bus departure information on the webpage
The voice file was successfully generated through Baidu Voice REST API
How to play it?
Save the file to the server
Or can ajax return the file and play it directly?
Solution:
Solution 1. Save to the server, use the audio tag of html5, or audio.js
Solution 2. Store the file on the server, and then return the voice url to the web page.