Skip to content

Commit

Permalink
update whisper module
Browse files Browse the repository at this point in the history
  • Loading branch information
kercre123 committed Sep 17, 2024
1 parent 45427c9 commit 1729f2a
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 15 deletions.
2 changes: 1 addition & 1 deletion chipper/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ require (
github.com/digital-dream-labs/opus-go v0.0.0-20201230195736-934a8a9e0a1e
github.com/digital-dream-labs/vector-bluetooth v0.0.0-20210604051118-1c511122d877
github.com/fforchino/vector-go-sdk v0.0.0-20231108155304-62168f3595d6
github.com/ggerganov/whisper.cpp/bindings/go v0.0.0-20240618151033-bf4cb4abad4e
github.com/ggerganov/whisper.cpp/bindings/go v0.0.0-20240917125632-5b1ce40fa882
github.com/go-audio/audio v1.0.0
github.com/go-audio/wav v1.1.0
github.com/golang-jwt/jwt v3.2.2+incompatible
Expand Down
2 changes: 2 additions & 0 deletions chipper/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,8 @@ github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4
github.com/fsouza/go-dockerclient v1.6.6/go.mod h1:3/oRIWoe7uT6bwtAayj/EmJmepBjeL4pYvt7ZxC7Rnk=
github.com/ggerganov/whisper.cpp/bindings/go v0.0.0-20240618151033-bf4cb4abad4e h1:np99/bjGH4/khEujoGbwc0ohMLh32GjovhEv2mJRNfs=
github.com/ggerganov/whisper.cpp/bindings/go v0.0.0-20240618151033-bf4cb4abad4e/go.mod h1:QIjZ9OktHFG7p+/m3sMvrAJKKdWrr1fZIK0rM6HZlyo=
github.com/ggerganov/whisper.cpp/bindings/go v0.0.0-20240917125632-5b1ce40fa882 h1:qH7ENKV0reL2gbvyzQ1mSWwML+eJ+IAEkTz5DmO4Ilg=
github.com/ggerganov/whisper.cpp/bindings/go v0.0.0-20240917125632-5b1ce40fa882/go.mod h1:QIjZ9OktHFG7p+/m3sMvrAJKKdWrr1fZIK0rM6HZlyo=
github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04=
github.com/go-audio/audio v1.0.0 h1:zS9vebldgbQqktK4H0lUqWrG8P0NxCJVqcj7ZpNnwd4=
github.com/go-audio/audio v1.0.0/go.mod h1:6uAu0+H2lHkwdGsAY+j2wHPNPpPoeg5AaEFh9FlA+Zs=
Expand Down
2 changes: 1 addition & 1 deletion vector-cloud/docker-builder/sources.list
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#deb http://snapshot.debian.org/archive/debian/20220821T091830Z buster main
deb http://deb.debian.org/debian buster main
deb http://archive.debian.org/debian buster main
#deb http://snapshot.debian.org/archive/debian-security/20220821T091830Z buster/updates main
#deb http://deb.debian.org/debian-security buster/updates main
#deb http://snapshot.debian.org/archive/debian/20220821T091830Z buster-updates main
Expand Down
25 changes: 12 additions & 13 deletions vector-cloud/gateway/message_handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ package main

import (
"encoding/binary"
"fmt"
"io/ioutil"
"math/rand"
"os"
Expand Down Expand Up @@ -1014,15 +1013,15 @@ func checkFilters(event *extint.Event, whiteList, blackList *extint.FilterList)
func (service *rpcService) onConnect(id string) {
// Call DAS WiFi connection event to indicate start of a WiFi connection.
// Log the connection id for the primary connection, which is the first person to connect.
log.Das("wifi_conn_id.start", (&log.DasFields{}).SetStrings(id))
//log.Das("wifi_conn_id.start", (&log.DasFields{}).SetStrings(id))
}

// Should be called on WiFi disconnect.
func (service *rpcService) onDisconnect() {
// Message engine that app disconnected
SendAppDisconnected()
// Call DAS WiFi connection event to indicate stop of a WiFi connection
log.Das("wifi_conn_id.stop", (&log.DasFields{}).SetStrings(""))
//log.Das("wifi_conn_id.stop", (&log.DasFields{}).SetStrings(""))
connectionId = ""
}

Expand Down Expand Up @@ -1061,11 +1060,11 @@ func (service *rpcService) checkConnectionID(id string) bool {

// SDK-only message to pass version info for device OS, Python version, etc.
func (service *rpcService) SDKInitialization(ctx context.Context, in *extint.SDKInitializationRequest) (*extint.SDKInitializationResponse, error) {
log.Das("sdk.module_version", (&log.DasFields{}).SetStrings(in.SdkModuleVersion))
log.Das("sdk.python_version", (&log.DasFields{}).SetStrings(in.PythonVersion))
log.Das("sdk.python_implementation", (&log.DasFields{}).SetStrings(in.PythonImplementation))
log.Das("sdk.os_version", (&log.DasFields{}).SetStrings(in.OsVersion))
log.Das("sdk.cpu_version", (&log.DasFields{}).SetStrings(in.CpuVersion))
//log.Das("sdk.module_version", (&log.DasFields{}).SetStrings(in.SdkModuleVersion))
//log.Das("sdk.python_version", (&log.DasFields{}).SetStrings(in.PythonVersion))
//log.Das("sdk.python_implementation", (&log.DasFields{}).SetStrings(in.PythonImplementation))
//log.Das("sdk.os_version", (&log.DasFields{}).SetStrings(in.OsVersion))
//log.Das("sdk.cpu_version", (&log.DasFields{}).SetStrings(in.CpuVersion))

return &extint.SDKInitializationResponse{
Status: &extint.ResponseStatus{
Expand Down Expand Up @@ -1259,15 +1258,15 @@ func (service *rpcService) BehaviorControlResponseHandler(out extint.ExternalInt

// SDK-only method. SDK DAS connect/disconnect events are sent from here.
func (service *rpcService) BehaviorControl(bidirectionalStream extint.ExternalInterface_BehaviorControlServer) error {
sdkStartTime := time.Now()
//sdkStartTime := time.Now()

numCommandsSentFromSDK = 0

log.Das("sdk.connection_started", (&log.DasFields{}).SetStrings(""))
//log.Das("sdk.connection_started", (&log.DasFields{}).SetStrings(""))

defer func() {
sdkElapsedSeconds := time.Since(sdkStartTime)
log.Das("sdk.connection_ended", (&log.DasFields{}).SetStrings(sdkElapsedSeconds.String(), fmt.Sprint(numCommandsSentFromSDK)))
//sdkElapsedSeconds := time.Since(sdkStartTime)
//log.Das("sdk.connection_ended", (&log.DasFields{}).SetStrings(sdkElapsedSeconds.String(), fmt.Sprint(numCommandsSentFromSDK)))
numCommandsSentFromSDK = 0
}()

Expand Down Expand Up @@ -1926,7 +1925,7 @@ func (service *rpcService) UserAuthentication(ctx context.Context, in *extint.Us
response := make(chan struct{})
tokenManager.ForceUpdate(response)
<-response
log.Das("sdk.activate", &log.DasFields{})
//log.Das("sdk.activate", &log.DasFields{})
} else {
token = ""
}
Expand Down

0 comments on commit 1729f2a

Please sign in to comment.