Skip to content

Commit 6793558

Browse files
committed
feat: enhance support for multiple ASR vendors
1 parent 0b3a090 commit 6793558

File tree

1 file changed

+23
-3
lines changed

1 file changed

+23
-3
lines changed

services/convoai/req/join.go

Lines changed: 23 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -444,8 +444,25 @@ const (
444444

445445
type ASRVendorParamsInterface interface {
446446
VendorParam()
447+
GetVendorType() ASRVendor
447448
}
448449

450+
// @brief Defines the Automatic Speech Recognition (ASR) Fengming vendor parameter for the agent to join the RTC channel
451+
//
452+
// @since v0.12.0
453+
type ASRFengmingVendorParam struct{}
454+
455+
func (ASRFengmingVendorParam) VendorParam() {}
456+
func (ASRFengmingVendorParam) GetVendorType() ASRVendor { return ASRVendorFengming }
457+
458+
// @brief Defines the Automatic Speech Recognition (ASR) Ares vendor parameter for the agent to join the RTC channel
459+
//
460+
// @since v0.12.0
461+
type ASRAresVendorParam struct{}
462+
463+
func (ASRAresVendorParam) VendorParam() {}
464+
func (ASRAresVendorParam) GetVendorType() ASRVendor { return ASRVendorAres }
465+
449466
// @brief Defines the Automatic Speech Recognition (ASR) Tencent vendor parameter for the agent to join the RTC channel
450467
//
451468
// @since v0.12.0
@@ -457,7 +474,8 @@ type ASRTencentVendorParam struct {
457474
VoiceId string `json:"voice_id"`
458475
}
459476

460-
func (ASRTencentVendorParam) VendorParam() {}
477+
func (ASRTencentVendorParam) VendorParam() {}
478+
func (ASRTencentVendorParam) GetVendorType() ASRVendor { return ASRVendorTencent }
461479

462480
// @brief Defines the Automatic Speech Recognition (ASR) Microsoft vendor parameter for the agent to join the RTC channel
463481
//
@@ -469,7 +487,8 @@ type ASRMicrosoftVendorParam struct {
469487
PhraseList []string `json:"phrase_list"`
470488
}
471489

472-
func (ASRMicrosoftVendorParam) VendorParam() {}
490+
func (ASRMicrosoftVendorParam) VendorParam() {}
491+
func (ASRMicrosoftVendorParam) GetVendorType() ASRVendor { return ASRVendorMicrosoft }
473492

474493
// @brief Defines the Automatic Speech Recognition (ASR) deepgram vendor parameter for the agent to join the RTC channel
475494
//
@@ -481,7 +500,8 @@ type ASRDeepgramVendorParam struct {
481500
Language string `json:"language"`
482501
}
483502

484-
func (ASRDeepgramVendorParam) VendorParam() {}
503+
func (ASRDeepgramVendorParam) VendorParam() {}
504+
func (ASRDeepgramVendorParam) GetVendorType() ASRVendor { return ASRVendorDeepgram }
485505

486506
// @brief Defines the Automatic Speech Recognition (ASR) configuration for the agent to join the RTC channel
487507
//

0 commit comments

Comments
 (0)