diff --git a/cmd/monty-python/impl/monty-python.go b/cmd/monty-python/impl/monty-python.go index 271b7d9..3d837f3 100644 --- a/cmd/monty-python/impl/monty-python.go +++ b/cmd/monty-python/impl/monty-python.go @@ -104,7 +104,7 @@ func (a *MyAssistant) Response(text string) error { if percent := matchr.JaroWinkler(key, text, false); percent > 0.95 { klog.V(5).Infof("\n\n--------------------------------\n") - klog.V(3).Infof("MATCH (%f): %s = %s\n", percent, key, text) + klog.V(4).Infof("MATCH (%f): %s = %s\n", percent, key, text) klog.V(5).Infof("\n--------------------------------\n\n") klog.V(2).Infof("Heard:\nMATCH (%f): %s = %s\n\n", percent, key, text) diff --git a/pkg/assistant/assistant.go b/pkg/assistant/assistant.go index 4cc95af..37ebc59 100644 --- a/pkg/assistant/assistant.go +++ b/pkg/assistant/assistant.go @@ -55,7 +55,7 @@ func New(assistantImpl *ainterfaces.AssistantImpl, opts *AssistantOptions) (*Ass // which transcriber? var transcriberStr string if v := os.Getenv("ASSISTANT_TRANSCRIBER"); v != "" { - klog.V(2).Infof("ASSISTANT_TRANSCRIBER found") + klog.V(2).Infof("ASSISTANT_TRANSCRIBER found\n") transcriberStr = v } diff --git a/pkg/speech/speech.go b/pkg/speech/speech.go index f275322..c9c85df 100644 --- a/pkg/speech/speech.go +++ b/pkg/speech/speech.go @@ -65,7 +65,7 @@ func New(ctx context.Context, opts *SpeechOptions) (*Client, error) { googleCredentials: googleCredentials, } - klog.V(3).Infof("speech.New Succeeded\n") + klog.V(4).Infof("speech.New Succeeded\n") klog.V(6).Infof("speech.New LEAVE\n") return client, nil @@ -102,7 +102,7 @@ func (sc *Client) TextToSpeech(ctx context.Context, text string) ([]byte, error) return []byte{}, err } - klog.V(3).Infof("Client.TextToSpeech Succeeded\n") + klog.V(4).Infof("Client.TextToSpeech Succeeded\n") klog.V(6).Infof("Client.TextToSpeech LEAVE\n") return resp.AudioContent, nil } @@ -145,7 +145,7 @@ func (sc *Client) PlayAudio(stream []byte) error { // wait until done... blocking! <-done - klog.V(3).Infof("PlayAudio Succeeded\n") + klog.V(4).Infof("PlayAudio Succeeded\n") klog.V(6).Infof("Client.PlayAudio LEAVE\n") return nil @@ -168,7 +168,7 @@ func (sc *Client) Play(ctx context.Context, text string) error { return err } - klog.V(3).Infof("Play Succeeded\n") + klog.V(4).Infof("Play Succeeded\n") klog.V(6).Infof("Client.Play LEAVE\n") return nil } diff --git a/pkg/transcriber/deepgram/deepgram.go b/pkg/transcriber/deepgram/deepgram.go index 280e053..51a5f6f 100644 --- a/pkg/transcriber/deepgram/deepgram.go +++ b/pkg/transcriber/deepgram/deepgram.go @@ -63,7 +63,7 @@ func New(ctx context.Context, opts *config.TranscribeOptions) (*Transcribe, erro Channels: opts.InputChannels, SampleRate: opts.SamplingRate, Punctuate: true, - // Keywords: []string{"Hey Kitt:32", "Hey Kit:16", "Hey:16", "Hello:16", "Hey:16", "Kitt:16", "Kit:16"}, + Keywords: []string{"Hey Kitt:32", "Hey Kit:16", "Hey:16", "Hello:16", "Hey:16", "Kitt:16", "Kit:16"}, // Endpointing: "500", } // klog.V(2).Infof("options: %v\n", options) @@ -87,7 +87,7 @@ func New(ctx context.Context, opts *config.TranscribeOptions) (*Transcribe, erro mic: mic, } - klog.V(3).Infof("transcribe.New Succeeded\n") + klog.V(4).Infof("transcribe.New Succeeded\n") klog.V(6).Infof("transcribe.New LEAVE\n") return transcribe, nil @@ -119,7 +119,7 @@ func (a *Transcribe) Start() error { a.mic.Stream(a.client) }() - klog.V(3).Infof("transcribe.Start Succeeded\n") + klog.V(4).Infof("transcribe.Start Succeeded\n") klog.V(6).Infof("transcribe.Start LEAVE\n") return nil } diff --git a/pkg/transcriber/deepgram/handler.go b/pkg/transcriber/deepgram/handler.go index 0147a64..4b3b9e0 100644 --- a/pkg/transcriber/deepgram/handler.go +++ b/pkg/transcriber/deepgram/handler.go @@ -44,7 +44,7 @@ func (i *Insights) Message(mr *api.MessageResponse) error { sentence := strings.TrimSpace(mr.Channel.Alternatives[0].Transcript) if len(mr.Channel.Alternatives) == 0 || len(sentence) == 0 { - // klog.V(7).Infof("DEEPGRAM - no transcript") + klog.V(7).Infof("DEEPGRAM - no transcript\n") return nil } @@ -52,16 +52,16 @@ func (i *Insights) Message(mr *api.MessageResponse) error { sentence = strings.ToLower(sentence) i.sb.WriteString(sentence) - // // debug - // klog.V(4).Infof("transcription result: text = %s, final = %t", i.sb.String(), isFinal) + // debug + klog.V(7).Infof("transcription result: text = %s, final = %t\n", i.sb.String(), isFinal) if !isFinal { - // klog.V(7).Infof("DEEPGRAM - not final") + klog.V(7).Infof("DEEPGRAM - not final\n") return nil } // debug - klog.V(2).Infof("Deepgram transcription: text = %s, final = %t", i.sb.String(), isFinal) + klog.V(3).Infof("Deepgram transcription: text = %s, final = %t", i.sb.String(), isFinal) // perform callback i.options.Microphone.Mute() @@ -75,9 +75,9 @@ func (i *Insights) Message(mr *api.MessageResponse) error { } func (i *Insights) Metadata(md *api.MetadataResponse) error { - klog.V(3).Infof("\nMetadata.RequestID: %s\n", strings.TrimSpace(md.RequestID)) - klog.V(3).Infof("Metadata.Channels: %d\n", md.Channels) - klog.V(3).Infof("Metadata.Created: %s\n\n", strings.TrimSpace(md.Created)) + klog.V(4).Infof("\nMetadata.RequestID: %s\n", strings.TrimSpace(md.RequestID)) + klog.V(4).Infof("Metadata.Channels: %d\n", md.Channels) + klog.V(4).Infof("Metadata.Created: %s\n\n", strings.TrimSpace(md.Created)) return nil } diff --git a/pkg/transcriber/google/google.go b/pkg/transcriber/google/google.go index 4207165..913d18e 100644 --- a/pkg/transcriber/google/google.go +++ b/pkg/transcriber/google/google.go @@ -136,7 +136,7 @@ func (t *Transcribe) Start() error { t.mic.Stream(t) }() - klog.V(3).Infof("transcribe.Start Succeeded\n") + klog.V(4).Infof("transcribe.Start Succeeded\n") klog.V(6).Infof("transcribe.Start LEAVE\n") return nil } @@ -275,7 +275,7 @@ func (t *Transcribe) listen() { // Debug... what is being said word for word sentence := sb.String() - klog.V(2).Infof("google transcription: text=%s final=%t\n", sentence, result.IsFinal) + klog.V(3).Infof("google transcription: text=%s final=%t\n", sentence, result.IsFinal) if t.options.Callback != nil { t.mic.Mute()