tts

package
v0.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 2, 2021 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	STATUS_FIRST_FRAME       = 0
	STATUS_CONTINUE_FRAME    = 1
	STATUS_LAST_FRAME        = 2
	HttpCodeSuccessHandshake = 101
)

Variables

This section is empty.

Functions

func HmacWithShaTobase64 added in v0.2.0

func HmacWithShaTobase64(algorithm, data, key string) string

Types

type BaseTts

type BaseTts interface {
	Create(msg string, params map[string]string) ([]byte, error)
}

BaseTts interface

type Data added in v0.2.0

type Data struct {
	Audio  string `json:"audio"`
	Ced    string `json:"ced"`
	Status int    `json:"status"`
}

type RespData added in v0.2.0

type RespData struct {
	Sid     string `json:"sid"`
	Code    int    `json:"code"`
	Message string `json:"message"`
	Data    Data   `json:"data"`
}

type XunfeiTts

type XunfeiTts struct {
	Host      string
	AppID     string
	ApiKey    string
	ApiSecret string
}

XunfeiTts Xunfei tts struct

func New

func New(host, appid, apiKey, apiSecret string) *XunfeiTts

New a xunfei tts instance

func (*XunfeiTts) Create

func (tts *XunfeiTts) Create(msg string) ([]byte, error)

Create 请求讯飞接口生层语音合成文件

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL