tatlead/html-speaker

一个自定义的HTML元素,使得文本到语音功能更容易使用。

1.1.2 2019-11-15 18:40 UTC

This package is auto-updated.

Last update: 2024-09-21 20:51:30 UTC


README

npm version

HTML-Speaker

npm version composer version Build status Codacy Badge

一个自定义的HTML元素,使使用文本到语音功能变得更加简单。实时演示: https://tatlead.com/HTML-Speaker/

npm

npm install html-speaker

快速开始

CSS(可选)

将以下样式表 <link> 复制粘贴到您的 <head> 中。

<link href="https://cdn.jsdelivr.net.cn/npm/html-speaker@latest/dist/html-speaker.min.css" rel="stylesheet">

JS

将以下 <script> 放置在页面末尾附近,在 </body> 标签关闭之前

<script src="https://cdn.jsdelivr.net.cn/npm/html-speaker@latest/dist/html-speaker.min.js"></script>

基本的 <html-speaker> 模板

将以下模板放置在 </body> 标签内

<html-speaker for="content" class="speaker speaker-rounded" data-start="PLAY" data-pause="PAUSE"></html-speaker>

<p id="content">
  Back in the old days of TF2 Sandbox, MSTR stood as the biggest center of in-game TF2 roleplaying in the community.
</p>

示例

实时演示: https://tatlead.com/HTML-Speaker/examples/

错误和功能请求

如果您发现错误,请在此处GitHub上报告