Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
dvonthenen committed Aug 23, 2024
1 parent 38e7fdd commit 4600bee
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
6 changes: 6 additions & 0 deletions .golangci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,12 @@ issues:
- path: pkg/client/listen/v1/websocket/new_using_chan.go
linters:
- gocritic
- path: pkg/client/speak/v1/websocket/client_callback.go
linters:
- dupl
- path: pkg/client/speak/v1/websocket/client_channel.go
linters:
- dupl
- path: pkg/client/listen/v1/websocket/client_callback.go
linters:
- dupl
Expand Down
6 changes: 4 additions & 2 deletions pkg/api/speak/v1/websocket/chan_default.go
Original file line number Diff line number Diff line change
Expand Up @@ -112,14 +112,16 @@ func (dch DefaultChanHandler) Run() error {
fmt.Printf("Hex Dump: %x...\n\n", (*br)[:20])
}
if dch.debugWebsocketVerbose {
file, err := os.OpenFile("output.mp3", os.O_APPEND|os.O_CREATE|os.O_WRONLY, 0644)
fmt.Printf("Dumping to verbose.wav\n")
file, err := os.OpenFile("verbose.wav", os.O_APPEND|os.O_CREATE|os.O_WRONLY, 0o644)
if err != nil {
fmt.Printf("Failed to open file. Err: %v\n", err)
continue
}
defer file.Close()

_, err = file.Write(*br)
file.Close()

if err != nil {
fmt.Printf("Failed to write to file. Err: %v\n", err)
continue
Expand Down

0 comments on commit 4600bee

Please sign in to comment.