Documentation ¶
Index ¶
- type FileConfig
- type FileConfigBuilder
- type FileRecognizeSpeechPathReqBodyBuilder
- func (builder *FileRecognizeSpeechPathReqBodyBuilder) Build() (*FileRecognizeSpeechReqBody, error)
- func (builder *FileRecognizeSpeechPathReqBodyBuilder) Config(config *FileConfig) *FileRecognizeSpeechPathReqBodyBuilder
- func (builder *FileRecognizeSpeechPathReqBodyBuilder) Speech(speech *Speech) *FileRecognizeSpeechPathReqBodyBuilder
- type FileRecognizeSpeechReq
- type FileRecognizeSpeechReqBody
- type FileRecognizeSpeechReqBodyBuilder
- func (builder *FileRecognizeSpeechReqBodyBuilder) Build() *FileRecognizeSpeechReqBody
- func (builder *FileRecognizeSpeechReqBodyBuilder) Config(config *FileConfig) *FileRecognizeSpeechReqBodyBuilder
- func (builder *FileRecognizeSpeechReqBodyBuilder) Speech(speech *Speech) *FileRecognizeSpeechReqBodyBuilder
- type FileRecognizeSpeechReqBuilder
- type FileRecognizeSpeechResp
- type FileRecognizeSpeechRespData
- type Speech
- type SpeechBuilder
- type SpeechToTextService
- type StreamConfig
- type StreamConfigBuilder
- func (builder *StreamConfigBuilder) Action(action int) *StreamConfigBuilder
- func (builder *StreamConfigBuilder) Build() *StreamConfig
- func (builder *StreamConfigBuilder) EngineType(engineType string) *StreamConfigBuilder
- func (builder *StreamConfigBuilder) Format(format string) *StreamConfigBuilder
- func (builder *StreamConfigBuilder) SequenceId(sequenceId int) *StreamConfigBuilder
- func (builder *StreamConfigBuilder) StreamId(streamId string) *StreamConfigBuilder
- type StreamRecognizeSpeechPathReqBodyBuilder
- func (builder *StreamRecognizeSpeechPathReqBodyBuilder) Build() (*StreamRecognizeSpeechReqBody, error)
- func (builder *StreamRecognizeSpeechPathReqBodyBuilder) Config(config *StreamConfig) *StreamRecognizeSpeechPathReqBodyBuilder
- func (builder *StreamRecognizeSpeechPathReqBodyBuilder) Speech(speech *Speech) *StreamRecognizeSpeechPathReqBodyBuilder
- type StreamRecognizeSpeechReq
- type StreamRecognizeSpeechReqBody
- type StreamRecognizeSpeechReqBodyBuilder
- func (builder *StreamRecognizeSpeechReqBodyBuilder) Build() *StreamRecognizeSpeechReqBody
- func (builder *StreamRecognizeSpeechReqBodyBuilder) Config(config *StreamConfig) *StreamRecognizeSpeechReqBodyBuilder
- func (builder *StreamRecognizeSpeechReqBodyBuilder) Speech(speech *Speech) *StreamRecognizeSpeechReqBodyBuilder
- type StreamRecognizeSpeechReqBuilder
- type StreamRecognizeSpeechResp
- type StreamRecognizeSpeechRespData
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FileConfig ¶
type FileConfigBuilder ¶
type FileConfigBuilder struct {
// contains filtered or unexported fields
}
func NewFileConfigBuilder ¶
func NewFileConfigBuilder() *FileConfigBuilder
func (*FileConfigBuilder) Build ¶
func (builder *FileConfigBuilder) Build() *FileConfig
func (*FileConfigBuilder) EngineType ¶
func (builder *FileConfigBuilder) EngineType(engineType string) *FileConfigBuilder
引擎类型,目前仅支持:16k_auto 中英混合
示例值:16k_auto
func (*FileConfigBuilder) FileId ¶
func (builder *FileConfigBuilder) FileId(fileId string) *FileConfigBuilder
仅包含字母数字和下划线的 16 位字符串作为文件的标识,用户生成
示例值:qwe12dd34567890w
func (*FileConfigBuilder) Format ¶
func (builder *FileConfigBuilder) Format(format string) *FileConfigBuilder
语音格式,目前仅支持:pcm
示例值:pcm
type FileRecognizeSpeechPathReqBodyBuilder ¶
type FileRecognizeSpeechPathReqBodyBuilder struct {
// contains filtered or unexported fields
}
func NewFileRecognizeSpeechPathReqBodyBuilder ¶
func NewFileRecognizeSpeechPathReqBodyBuilder() *FileRecognizeSpeechPathReqBodyBuilder
func (*FileRecognizeSpeechPathReqBodyBuilder) Build ¶
func (builder *FileRecognizeSpeechPathReqBodyBuilder) Build() (*FileRecognizeSpeechReqBody, error)
func (*FileRecognizeSpeechPathReqBodyBuilder) Config ¶
func (builder *FileRecognizeSpeechPathReqBodyBuilder) Config(config *FileConfig) *FileRecognizeSpeechPathReqBodyBuilder
配置属性
示例值:
func (*FileRecognizeSpeechPathReqBodyBuilder) Speech ¶
func (builder *FileRecognizeSpeechPathReqBodyBuilder) Speech(speech *Speech) *FileRecognizeSpeechPathReqBodyBuilder
语音资源
示例值:
type FileRecognizeSpeechReq ¶
type FileRecognizeSpeechReq struct { Body *FileRecognizeSpeechReqBody `body:""` // contains filtered or unexported fields }
type FileRecognizeSpeechReqBody ¶
type FileRecognizeSpeechReqBody struct { Speech *Speech `json:"speech,omitempty"` // 语音资源 Config *FileConfig `json:"config,omitempty"` // 配置属性 }
type FileRecognizeSpeechReqBodyBuilder ¶
type FileRecognizeSpeechReqBodyBuilder struct {
// contains filtered or unexported fields
}
func NewFileRecognizeSpeechReqBodyBuilder ¶
func NewFileRecognizeSpeechReqBodyBuilder() *FileRecognizeSpeechReqBodyBuilder
func (*FileRecognizeSpeechReqBodyBuilder) Build ¶
func (builder *FileRecognizeSpeechReqBodyBuilder) Build() *FileRecognizeSpeechReqBody
func (*FileRecognizeSpeechReqBodyBuilder) Config ¶
func (builder *FileRecognizeSpeechReqBodyBuilder) Config(config *FileConfig) *FileRecognizeSpeechReqBodyBuilder
配置属性
示例值:
func (*FileRecognizeSpeechReqBodyBuilder) Speech ¶
func (builder *FileRecognizeSpeechReqBodyBuilder) Speech(speech *Speech) *FileRecognizeSpeechReqBodyBuilder
语音资源
示例值:
type FileRecognizeSpeechReqBuilder ¶
type FileRecognizeSpeechReqBuilder struct {
// contains filtered or unexported fields
}
func NewFileRecognizeSpeechReqBuilder ¶
func NewFileRecognizeSpeechReqBuilder() *FileRecognizeSpeechReqBuilder
func (*FileRecognizeSpeechReqBuilder) Body ¶
func (builder *FileRecognizeSpeechReqBuilder) Body(body *FileRecognizeSpeechReqBody) *FileRecognizeSpeechReqBuilder
语音文件识别接口,上传整段语音文件进行一次性识别。接口适合 60 秒以内音频识别
func (*FileRecognizeSpeechReqBuilder) Build ¶
func (builder *FileRecognizeSpeechReqBuilder) Build() *FileRecognizeSpeechReq
type FileRecognizeSpeechResp ¶
type FileRecognizeSpeechResp struct { *larkcore.ApiResp `json:"-"` larkcore.CodeError Data *FileRecognizeSpeechRespData `json:"data"` // 业务数据 }
func (*FileRecognizeSpeechResp) Success ¶
func (resp *FileRecognizeSpeechResp) Success() bool
type FileRecognizeSpeechRespData ¶
type FileRecognizeSpeechRespData struct {
RecognitionText *string `json:"recognition_text,omitempty"` // 语音识别后的文本信息
}
type SpeechBuilder ¶
type SpeechBuilder struct {
// contains filtered or unexported fields
}
func NewSpeechBuilder ¶
func NewSpeechBuilder() *SpeechBuilder
func (*SpeechBuilder) Build ¶
func (builder *SpeechBuilder) Build() *Speech
func (*SpeechBuilder) Speech ¶
func (builder *SpeechBuilder) Speech(speech string) *SpeechBuilder
pcm格式音频文件(文件识别)或音频分片(流式识别)经base64编码后的内容
示例值:PdmrfE267Cd/Z9KpmNFh71A2PSJZxSp7+8upCg==
func (*SpeechBuilder) SpeechKey ¶
func (builder *SpeechBuilder) SpeechKey(speechKey string) *SpeechBuilder
上传到 drive 存储平台后获取到的 key (暂不支持)
示例值:
type SpeechToTextService ¶
type SpeechToTextService struct { Speech *speech // 语音识别 // contains filtered or unexported fields }
func NewService ¶
func NewService(config *larkcore.Config) *SpeechToTextService
type StreamConfig ¶
type StreamConfig struct { StreamId *string `json:"stream_id,omitempty"` // 仅包含字母数字和下划线的 16 位字符串作为同一数据流的标识,用户生成 SequenceId *int `json:"sequence_id,omitempty"` // 数据流分片的序号,序号从 0 开始,每次请求递增 1 Action *int `json:"action,omitempty"` // 数据流标记:1 首包,2 正常结束,等待结果返回,3 中断数据流不返回最终结果 Format *string `json:"format,omitempty"` // 语音格式,目前仅支持:pcm EngineType *string `json:"engine_type,omitempty"` // 引擎类型,目前仅支持:16k_auto 中英混合 }
type StreamConfigBuilder ¶
type StreamConfigBuilder struct {
// contains filtered or unexported fields
}
func NewStreamConfigBuilder ¶
func NewStreamConfigBuilder() *StreamConfigBuilder
func (*StreamConfigBuilder) Action ¶
func (builder *StreamConfigBuilder) Action(action int) *StreamConfigBuilder
数据流标记:1 首包,2 正常结束,等待结果返回,3 中断数据流不返回最终结果
示例值:1
func (*StreamConfigBuilder) Build ¶
func (builder *StreamConfigBuilder) Build() *StreamConfig
func (*StreamConfigBuilder) EngineType ¶
func (builder *StreamConfigBuilder) EngineType(engineType string) *StreamConfigBuilder
引擎类型,目前仅支持:16k_auto 中英混合
示例值:16k_auto
func (*StreamConfigBuilder) Format ¶
func (builder *StreamConfigBuilder) Format(format string) *StreamConfigBuilder
语音格式,目前仅支持:pcm
示例值:pcm
func (*StreamConfigBuilder) SequenceId ¶
func (builder *StreamConfigBuilder) SequenceId(sequenceId int) *StreamConfigBuilder
数据流分片的序号,序号从 0 开始,每次请求递增 1
示例值:1
func (*StreamConfigBuilder) StreamId ¶
func (builder *StreamConfigBuilder) StreamId(streamId string) *StreamConfigBuilder
仅包含字母数字和下划线的 16 位字符串作为同一数据流的标识,用户生成
示例值:asd1234567890ddd
type StreamRecognizeSpeechPathReqBodyBuilder ¶
type StreamRecognizeSpeechPathReqBodyBuilder struct {
// contains filtered or unexported fields
}
func NewStreamRecognizeSpeechPathReqBodyBuilder ¶
func NewStreamRecognizeSpeechPathReqBodyBuilder() *StreamRecognizeSpeechPathReqBodyBuilder
func (*StreamRecognizeSpeechPathReqBodyBuilder) Build ¶
func (builder *StreamRecognizeSpeechPathReqBodyBuilder) Build() (*StreamRecognizeSpeechReqBody, error)
func (*StreamRecognizeSpeechPathReqBodyBuilder) Config ¶
func (builder *StreamRecognizeSpeechPathReqBodyBuilder) Config(config *StreamConfig) *StreamRecognizeSpeechPathReqBodyBuilder
配置属性
示例值:
func (*StreamRecognizeSpeechPathReqBodyBuilder) Speech ¶
func (builder *StreamRecognizeSpeechPathReqBodyBuilder) Speech(speech *Speech) *StreamRecognizeSpeechPathReqBodyBuilder
语音资源
示例值:
type StreamRecognizeSpeechReq ¶
type StreamRecognizeSpeechReq struct { Body *StreamRecognizeSpeechReqBody `body:""` // contains filtered or unexported fields }
type StreamRecognizeSpeechReqBody ¶
type StreamRecognizeSpeechReqBody struct { Speech *Speech `json:"speech,omitempty"` // 语音资源 Config *StreamConfig `json:"config,omitempty"` // 配置属性 }
type StreamRecognizeSpeechReqBodyBuilder ¶
type StreamRecognizeSpeechReqBodyBuilder struct {
// contains filtered or unexported fields
}
func NewStreamRecognizeSpeechReqBodyBuilder ¶
func NewStreamRecognizeSpeechReqBodyBuilder() *StreamRecognizeSpeechReqBodyBuilder
func (*StreamRecognizeSpeechReqBodyBuilder) Build ¶
func (builder *StreamRecognizeSpeechReqBodyBuilder) Build() *StreamRecognizeSpeechReqBody
func (*StreamRecognizeSpeechReqBodyBuilder) Config ¶
func (builder *StreamRecognizeSpeechReqBodyBuilder) Config(config *StreamConfig) *StreamRecognizeSpeechReqBodyBuilder
配置属性
示例值:
func (*StreamRecognizeSpeechReqBodyBuilder) Speech ¶
func (builder *StreamRecognizeSpeechReqBodyBuilder) Speech(speech *Speech) *StreamRecognizeSpeechReqBodyBuilder
语音资源
示例值:
type StreamRecognizeSpeechReqBuilder ¶
type StreamRecognizeSpeechReqBuilder struct {
// contains filtered or unexported fields
}
func NewStreamRecognizeSpeechReqBuilder ¶
func NewStreamRecognizeSpeechReqBuilder() *StreamRecognizeSpeechReqBuilder
func (*StreamRecognizeSpeechReqBuilder) Body ¶
func (builder *StreamRecognizeSpeechReqBuilder) Body(body *StreamRecognizeSpeechReqBody) *StreamRecognizeSpeechReqBuilder
语音流式接口,将整个音频文件分片进行传入模型。能够实时返回数据。建议每个音频分片的大小为 100-200ms
func (*StreamRecognizeSpeechReqBuilder) Build ¶
func (builder *StreamRecognizeSpeechReqBuilder) Build() *StreamRecognizeSpeechReq
type StreamRecognizeSpeechResp ¶
type StreamRecognizeSpeechResp struct { *larkcore.ApiResp `json:"-"` larkcore.CodeError Data *StreamRecognizeSpeechRespData `json:"data"` // 业务数据 }
func (*StreamRecognizeSpeechResp) Success ¶
func (resp *StreamRecognizeSpeechResp) Success() bool
Click to show internal directories.
Click to hide internal directories.