rest

package
v0.0.10 Latest Latest
Warning

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

Go to latest
Published: Feb 18, 2020 License: GPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Text2Audio

type Text2Audio struct {
	// 要轉換的文本 小於 2048 轉 GBK 後 小於 4096
	// Text string
	// Token.AccessToken
	AccessToken string
	// 用來 計算 UV 的字符串 通常是 MAC 或 IMEI 最大 60 字符
	UV string

	// 客戶端 類型 web 固定爲 1
	Client int

	// 語言 固定爲 zh
	Language string

	// 語速 [0-15] 5
	Speed int

	// 音調 [0-15] 5
	Pitch int
	// 音量 [0-15] 5
	Volume int
	// 發音人
	// 0 为普通女声
	// 1 为普通男生
	// 3 为情感合成-度逍遥
	// 4 为情感合成-度丫丫
	// 默认为普通女声
	Person int
	// 音頻格式
	// 3 为 mp3格式(默认)
	// 4 为 pcm-16k
	// 5 为 pcm-8k
	// 6 为 wav(内容同pcm-16k)
	Aue int
}

Text2Audio 文字 轉語音

func NewText2Audio

func NewText2Audio() *Text2Audio

NewText2Audio 創建一個 默認的 語音轉換 設置

func (*Text2Audio) Request

func (t *Text2Audio) Request(ctx context.Context, token *oauth.Token, text string) (r io.ReadCloser, content string, e error)

Request 發送一個 轉換請求

Jump to

Keyboard shortcuts

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