translation

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Apr 17, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func OnInit

func OnInit(config map[string]interface{}, option ...Option) (err error)

func Translation_Text_Base

func Translation_Text_Base(ctx context.Context, original string, from, to string) (result string, err error)

func Translation_Text_GoogleV3

func Translation_Text_GoogleV3(ctx context.Context, original string, from, to string) (result string, err error)

func Translation_Voice

func Translation_Voice(ctx context.Context, original []byte, from string) (result string, err error)

Types

type ISys

type ISys interface {
	Translation_Text_Base(ctx context.Context, original string, from, to string) (result string, err error)
	Translation_Text_GoogleV3(ctx context.Context, original string, from, to string) (result string, err error)
	Translation_Voice(ctx context.Context, original []byte, from string) (result string, err error)
}

func NewSys

func NewSys(option ...Option) (sys ISys, err error)

type Option

type Option func(*Options)

func SetAppId

func SetAppId(v string) Option

type Options

type Options struct {
	AppId string
}

type Translation

type Translation struct {
	// contains filtered or unexported fields
}

func (*Translation) Translation_Text_Base

func (this *Translation) Translation_Text_Base(ctx context.Context, original string, from, to string) (result string, err error)

文字翻译

func (*Translation) Translation_Text_GoogleV3

func (this *Translation) Translation_Text_GoogleV3(ctx context.Context, original string, from, to string) (result string, err error)

文字翻译

func (*Translation) Translation_Voice

func (this *Translation) Translation_Voice(ctx context.Context, original []byte, from string) (result string, err error)

语音转文字

Jump to

Keyboard shortcuts

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