I want to be a Mini Program who memorizes CET-4 and CET-6. I have a question about how to obtain audio. I hope I can help you answer it.

there is a ready-made CET-4 and CET-6 vocabulary on the Internet. Api can get words, translations, phonetic symbols and audio URLs through the vocabulary request.
the local audio that Mini Program requests to save 500words at a time, there are three ways to deal with the audio:

1. Return the acquired audio URL directly to the Mini Program client, so that because they are all characters, the memory required is not large. At present, there are two uncertain questions: whether the audio URL will change (personal feelings generally will not change). Audio acquisition delay is not large

2. Download the obtained audio URL as MP3, and save it on my server, and return my server audio address

3. Download the acquired audio URL as MP3, and save it on my server. When requesting 500words, download 100audio locally

.

because the word recitation is faster than the page turning, I hope that when the word is displayed, the audio can be played automatically, reducing the delay as much as possible

so, which of the three options is better? thank you

The third kind of

has a certain degree of implementation, because if the audio URL is found to be visited by a large number of visitors (someone reading his audio is not through his URL, it may change the path), the scheme of caching part of the audio file behind you is good


if the voice is copyrighted by you, you can do URI solidification
if the voice is not your own, it doesn't matter if you use it yourself. If the application is developed commercially, it may lead to infringement and problems.

Menu