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

javascript - Speech synthesis real-time playback problem

PHP中文网
PHP中文网Original
2016-09-08 08:44:021216browse

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.

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