Re: Coqui TTS has blew my mind!

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Well, I just call it a fallback link because this is what it kinda does. If a browser doesn't support the HTML5 audio tag, and by 2022 they all should, my code falls back to displaying links that can be clicked to download the selected title. . So this is an example of the HTML5 audio tag that I use whenever I put a new song or recording up on my website

<audio
    title="Something Interesting Here"
    controls="controls">
    <source src="/music/Kyle%20-%20Something%20Interesting%20Here.opus" type="audio/ogg; codecs=opus" />     <source src="/music/Kyle%20-%20Something%20Interesting%20Here.ogg" type="audio/ogg; codecs=vorbis" />
    Something Interesting Here
    <a href="/music/Kyle%20-%20Something%20Interesting%20Here.opus">96kbps Opus</a> |     <a href="/music/Kyle%20-%20Something%20Interesting%20Here.ogg">q4 Vorbis</a>

    </audio>


You will immediately notice some text, along with two <a> tags, embedded in the <audio> tag below the <source> tags. The specification for the HTML5 audio tag indicates that anything between <audio> and </audio> that is not a source is ignored by HTML5-compatible browsers. Conversely, browsers that do not support HTML5 simply ignore the tags they can't understand, which are <audio> ... </audio> and the <source tags in between, but they display anything they do understand, in this case, the text that is the title of the song and the <a> tags that are the download links, in 96Kb/s opus and Q3 Ogg Vorbis formats. Now that mp3 is officially free of all patents, I need to revisit this code and add mp3 streams and downloads to this code as well, so that I can officially support most free lossy codecs depending on what the end user has available, as I can be fairly certain that nearly all visitors to my website will have at least opus, vorbis and/or mp3 codecs available to play my recorded work. The thing to note is that anything that appears between <audio> and </audio or <video> and </video> that is not a source tag is ignored by HTML5 browsers, but is displayed by HTML4 browsers. It is considered fallback text because this is its function. It is also worth noting however that although fallback text is part of the <audio> and <video> tag specifications, it is not at all required, either for accessibility or for usability. I just added this fallback text including the download links just as I added multiple codec sources, so that as many people as possible would be able to stream and/or download my recordings. Again, it was a personal decision, not a requirement or even a guideline suggested or imposed by any standards body. But I do hope this explains what fallback text is, or fallback links, their usage and benefits, how this can be applied, and just how easy it actually is to apply such fallback HTML to existing standard player code.

~Kyle

_______________________________________________
Blinux-list mailing list
Blinux-list@xxxxxxxxxx
https://listman.redhat.com/mailman/listinfo/blinux-list




[Index of Archives]     [Linux Speakup]     [Fedora]     [Linux Kernel]     [Yosemite News]     [Big List of Linux Books]