Skip to content

Commit

Permalink
Glharper/audio input reattach fix (#402)
Browse files Browse the repository at this point in the history
* Fix push stream not being reconnected to with start-stop-start continuous recognition, add test

* change timeout for added test

* Fix error when down sampling with audioWorkletNode
  • Loading branch information
glharper authored and BrianMouncer committed Jul 13, 2021
1 parent 1cd738b commit acf6e36
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/common/RiffPcmEncoder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,10 @@ export class RiffPcmEncoder {
srcRate: number,
dstRate: number): Float32Array => {

if (!srcFrame) {
return null;
}

if (dstRate === srcRate || dstRate > srcRate) {
return srcFrame;
}
Expand Down

0 comments on commit acf6e36

Please sign in to comment.