{% extends base %}

{% block body %}

<div id="app" class="card">
    {% set title = "文字转语音" %}
    {% include common/base_title.html %}
    <textarea class="col-md-12" rows=20 id="content"></textarea>
    <button onclick="readText()">Read</button>
</div>

<script type="text/javascript">

function readText() {
    var content = $("#content").val();
    $.post("/api/tts", {content: content}, function (data, status) {
        console.log(data);
    });
}
</script>

{% end %}