Home  >  Article  >  Backend Development  >  Speech synthesis real-time playback problem

Speech synthesis real-time playback problem

PHP中文网
PHP中文网Original
2016-09-08 08:29:351302browse

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:

Option 1.Save to the server, use the audio tag of html5, or audio.js


Option 2. Store the file on the server, and then return the voice url to the web page .


Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn