Skip to content
This repository has been archived by the owner on Jan 27, 2024. It is now read-only.

Commit

Permalink
tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
theomonnom committed Apr 8, 2023
1 parent 00e1ae0 commit 1630a8c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
5 changes: 2 additions & 3 deletions lkgpt-service/pkg/service/gptparticipant.go
Original file line number Diff line number Diff line change
Expand Up @@ -289,9 +289,8 @@ func (p *GPTParticipant) onTranscriptionReceived(result RecognizeResult, rp *lks
}
subject := strings.Contains(text, "kit") || strings.Contains(text, "gpt")
if greeting && subject {
justActivated = true
if activeParticipant != rp {
// Activate the participant
justActivated = true
activeParticipant = rp

p.lock.Lock()
Expand All @@ -307,7 +306,7 @@ func (p *GPTParticipant) onTranscriptionReceived(result RecognizeResult, rp *lks

if result.IsFinal {
shouldAnswer = activeParticipant == rp
if justActivated && len(words) <= 3 {
if justActivated && len(words) <= 4 {
// Ignore if the participant stopped speaking after the activation
// Answer his next sentence
shouldAnswer = false
Expand Down
2 changes: 1 addition & 1 deletion lkgpt-service/pkg/service/transcriber.go
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ func (t *Transcriber) newStream() (sttpb.Speech_StreamingRecognizeClient, error)
{Value: "Kit-t"},
{Value: "Kit"},
},
Boost: 19,
Boost: 8,
},
},
CustomClasses: []*sttpb.CustomClass{
Expand Down

0 comments on commit 1630a8c

Please sign in to comment.