Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 0ba088a

Browse filesBrowse files
author
Jerjou Cheng
committed
Make sure chunks_per_second is a whole number.
1 parent 1c71119 commit 0ba088a
Copy full SHA for 0ba088a

File tree

Expand file treeCollapse file tree

1 file changed

+1
-2
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+1
-2
lines changed

‎speech/cloud-client/transcribe_streaming_indefinite.py

Copy file name to clipboardExpand all lines: speech/cloud-client/transcribe_streaming_indefinite.py
+1-2Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@
3939
from google.cloud import speech
4040
from google.cloud.speech import enums
4141
from google.cloud.speech import types
42-
from google import gax
4342
import grpc
4443
import pyaudio
4544
from six.moves import queue
@@ -66,7 +65,7 @@ def __init__(self, rate, chunk_size, max_replay_secs=5):
6665

6766
self._bytes_per_chunk = (self._chunk_size * self._bytes_per_sample)
6867
self._chunks_per_second = (
69-
self._bytes_per_second / self._bytes_per_chunk)
68+
self._bytes_per_second // self._bytes_per_chunk)
7069
self._untranscribed = collections.deque(
7170
maxlen=self._max_replay_secs * self._chunks_per_second)
7271

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.