ai

package
v0.0.0-...-66c88e8 Latest Latest
Warning

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

Go to latest
Published: Jun 15, 2019 License: MIT Imports: 12 Imported by: 1

Documentation

Index

Constants

View Source
const (

	// 发音人选择, 0为普通女声,1为普通男生,3为情感合成-度逍遥,4为情感合成-度丫丫,默认为普通女声
	PER = 0
	// 语速,取值0-15,默认为5中语速
	SPD = 3
	// 音调,取值0-15,默认为5中语调
	PIT = 5
	// 音量,取值0-9,默认为5中音量
	VOL = 9
	// 下载的文件格式, 3:mp3(default) 4: pcm-16k 5: pcm-8k 6. wav
	AUE = 3

	CUID      = "123456PYTHON"
	TTS_URL   = "http://tsn.baidu.com/text2audio"
	TOKEN_URL = "http://openapi.baidu.com/oauth/2.0/token"
)
View Source
const POST_REMOTE_TIMEOUT = 30

Variables

This section is empty.

Functions

func CreateVoice

func CreateVoice(prefix string, id int, content string) (path string, err error)

func ParamsToStr

func ParamsToStr(params map[string]interface{}) string

func Task

func Task()

func WriteWithIoutil

func WriteWithIoutil(name, content string)

Types

type CommResp

type CommResp struct {
	AccessToken   string `json:"access_token"`
	SessionKey    string `json:"session_key"`
	Scope         string `json:"scope"`
	RefreshToken  string `json:"refresh_token"`
	SessionSecret string `json:"session_secret"`
	ExpiresIn     string `json:"expires_in"`
}

Jump to

Keyboard shortcuts

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