跳至主要內容

TOOLFK tool-online text-to-speech / speech synthesis mp3 tool

The [TOOLFK] online text-to-speech / speech synthesis mp3 tool recommended in this article provides text-to-speech functionality.

Code teaching

This tool [online text-to-speech tool] uses Baidu speech synthesis tool
STEP 1 interface

STEP2
The front-end submission code of the online text-to-speech tool is as follows, and the back-end calls the Baidu API interface.

$(".ant-btn-primary").click(function(){
    var tval = $('#voiceText').val();
    if(tval.length<5){
        layer.msg(NOT_EMPTY);
        return false;
    }
    var index = layer.load();
    $.post("/text2video",$('#video-form').serialize(),function(res){
        layer.close(index);
        if(res.status == 1){
            layer.open({
                type: 1,
                title: false,
                area: ['320px', '105px'],
                shade: 0.8,
                btn: ["Download","Close"],
                shadeClose: true,
                content: '<audio controls autoplay> <source src="'+res.url+'" type="audio/ogg"> <source src="horse.mp3" type="audio/mpeg">Your browser does not support the audio element. </audio>'
                ,success: function(layero){
                    var btn = layero.find('.layui-layer-btn');
                    btn.find('.layui-layer-btn0').attr({
                        href: res.url,
                        download:res.data,
                        target: '_blank'
                    });
                },btn2: function(index, layero){
                    layer.close(index);
                }
            });
        }else{
            layer.msg(res.info);
        }
    });

});

留言

此網誌的熱門文章

BASE64-line encryption and decryption, UrlEncode encoding / decoding, native / ascii online conversion tool - toolfk online Programmer toolbox

   This paper to recommend [ToolFk] is a programmers often use a free online test kit, ToolFk feature is focused on everyday programmer development tools, without having to install any software, as long as the content execution affixed by a button, able to obtain the contents of the desired results. ToolFk also supports    BarCode Barcode generated online  ,   QueryList collector  ,   PHP code is run online  ,   PHP confusion, encryption, decryption  ,   Python code is run online  ,  JavaScript online operation  , YAML formatting tools  ,  HTTP simulation query tool  ,  HTML online toolbox  ,  JavaScript online Toolbox  , CSS online toolbox  ,  JSON online toolbox  ,  unixtime timestamp conversion  ,  Base64 / the URL of / native2ascii conversion  ,  CSV conversion kit  ,  XML online toolbox  ,...

Use PHP CURL simulate HTTP requests for online tool -toolfk online Programmer toolbox

      This paper to recommend [ToolFk] is a programmers often use a free online test kit, ToolFk feature is focused on everyday programmer development tools, without having to install any software, as long as the content execution affixed by a button, able to obtain the contents of the desired results. ToolFk also supports    BarCode Barcode generated online  ,   QueryList collector  ,   PHP code is run online  ,   PHP confusion, encryption, decryption  ,   Python code is run online  ,  JavaScript online operation  , YAML formatting tools  ,  HTTP simulation query tool  ,  HTML online toolbox  ,  JavaScript online Toolbox  , CSS online toolbox  ,  JSON online toolbox  ,  unixtime timestamp conversion  ,  Base64 / the URL of / native2ascii conversion  ,  CSV conversion kit  ,  XML online toolbox...

PHP to achieve pseudo-original free online tools - toolfk online Programmer toolbox

      This paper to recommend [ToolFk] is a programmers often use a free online test kit, ToolFk feature is focused on everyday programmer development tools, without having to install any software, as long as the content execution affixed by a button, able to obtain the contents of the desired results. ToolFk also supports    BarCode Barcode generated online  ,   QueryList collector  ,   PHP code is run online  ,   PHP confusion, encryption, decryption  ,   Python code is run online  ,  JavaScript online operation  , YAML formatting tools  ,  HTTP simulation query tool  ,  HTML online toolbox  ,  JavaScript online Toolbox  , CSS online toolbox  ,  JSON online toolbox  ,  unixtime timestamp conversion  ,  Base64 / the URL of / native2ascii conversion  ,  CSV conversion kit  ,  XML online toolbox...