Skip to content

Commit 6e591be

Browse files
authored
fixed the issue with transcribed text exits after one word (GoogleCloudPlatform#11164)
* fixed the issue with transcript text exits after one word * add python version 3.12 into noxfile_config.py * add 3.12 python version in noxfile_config.py in speech folder * removed the 3.12 * adding noxfile into directory
1 parent 196be7a commit 6e591be

File tree

2 files changed

+36
-1
lines changed

2 files changed

+36
-1
lines changed
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# Copyright 2021 Google LLC
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
16+
TEST_CONFIG_OVERRIDE = {
17+
# You can opt out from the test for specific Python versions.
18+
"ignored_versions": ["2.7", "3.7", "3.9", "3.10", "3.11", "3.12"],
19+
# Old samples are opted out of enforcing Python type hints
20+
# All new samples should feature them
21+
"enforce_type_hints": True,
22+
# An envvar key for determining the project id to use. Change it
23+
# to 'BUILD_SPECIFIC_GCLOUD_PROJECT' if you want to opt in using a
24+
# build specific Cloud project. You can also use your own string
25+
# to use your own Cloud project.
26+
"gcloud_project_env": "GOOGLE_CLOUD_PROJECT",
27+
# 'gcloud_project_env': 'BUILD_SPECIFIC_GCLOUD_PROJECT',
28+
# If you need to use a specific version of pip,
29+
# change pip_version_override to the string representation
30+
# of the version number, for example, "20.2.4"
31+
"pip_version_override": None,
32+
# A dictionary you want to inject into your test. Don't put any
33+
# secrets here. These values will override predefined values.
34+
"envs": {},
35+
}

speech/microphone/transcribe_streaming_mic.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ def listen_print_loop(responses: object) -> str:
197197

198198
num_chars_printed = 0
199199

200-
return transcript
200+
return transcript
201201

202202

203203
def main() -> None:

0 commit comments

Comments
 (0)