Documentation ¶
Index ¶
- Constants
- func NewSpeech(accessKeyId, accessKeySecret, appKey string, wellKnownNumber map[string]int, ...) text.ISpeech
- type Response
- type Result
- type SentencesResult
- type Speech
- func (s *Speech) BreakSentence(channelId int, rsp *Response) (ret []*srt.Srt, err error)
- func (s *Speech) Equal(sw, w string) bool
- func (s *Speech) NewBreakSentence(channelId int, rsp *Response) (ret []*srt.Srt, err error)
- func (s *Speech) Recognize(ctx context.Context, fileUri string) (sRet []*srt.Srt, wRet []*srt.Srt, err error)
- func (s *Speech) Sentence(channelId int, rsp *Response) (ret []*srt.Srt, err error)
- func (s *Speech) SplitSentence(channelId int, rsp *Response) (ret []*srt.Srt)
- type WordResult
Constants ¶
View Source
const API_VERSION string = "2018-08-17"
View Source
const DOMAIN string = "filetrans.cn-shanghai.aliyuncs.com"
View Source
const ENDPOINT_NAME string = "cn-shanghai"
View Source
const GET_REQUEST_ACTION string = "GetTaskResult"
View Source
const KEY_APP_KEY string = "appkey"
请求参数key
View Source
const KEY_ENABLE_DISFLUENCY = "enable_disfluency"
View Source
const KEY_ENABLE_UNIFY_POST = "enable_unify_post"
View Source
const KEY_ENABLE_WORDS string = "enable_words"
View Source
const KEY_FILE_LINK string = "file_link"
View Source
const KEY_MAX_SINGLE_SEGMENT_TIME = "max_single_segment_time"
View Source
const KEY_RESULT string = "Result"
View Source
const KEY_STATUS_TEXT string = "StatusText"
View Source
const KEY_TASK string = "Task"
响应参数key
View Source
const KEY_TASK_ID string = "TaskId"
View Source
const KEY_VERSION string = "version"
View Source
const POST_REQUEST_ACTION string = "SubmitTask"
View Source
const PRODUCT string = "nls-filetrans"
View Source
const REGION_ID string = "cn-shanghai"
地域ID,常量内容,请勿改变
View Source
const STATUS_QUEUEING string = "QUEUEING"
View Source
const STATUS_RUNNING string = "RUNNING"
View Source
const STATUS_SUCCESS string = "SUCCESS"
状态值
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Result ¶
type Result struct { Sentences []*SentencesResult `json:"Sentences"` Words []*WordResult `json:"Words"` }
type SentencesResult ¶
type Speech ¶
type Speech struct {
// contains filtered or unexported fields
}
func (*Speech) BreakSentence ¶ added in v1.1.1
func (*Speech) NewBreakSentence ¶ added in v1.2.0
Click to show internal directories.
Click to hide internal directories.