Skip to content

Commit 1d31a0b

Browse files
committed
fix: move samples into samples/snippets
1 parent fb03368 commit 1d31a0b

File tree

2 files changed

+68
-3
lines changed

2 files changed

+68
-3
lines changed

texttospeech/snippets/README.rst

Lines changed: 31 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
12
.. This file is automatically generated. Do not edit this file directly.
23
34
Google Cloud Text-to-Speech API Python Samples
@@ -14,10 +15,12 @@ This directory contains samples for Google Cloud Text-to-Speech API. The `Google
1415

1516
.. _Google Cloud Text-to-Speech API: https://cloud.google.com/text-to-speech/docs/
1617

18+
1719
Setup
1820
-------------------------------------------------------------------------------
1921

2022

23+
2124
Authentication
2225
++++++++++++++
2326

@@ -28,6 +31,9 @@ credentials for applications.
2831
.. _Authentication Getting Started Guide:
2932
https://cloud.google.com/docs/authentication/getting-started
3033

34+
35+
36+
3137
Install Dependencies
3238
++++++++++++++++++++
3339

@@ -42,7 +48,7 @@ Install Dependencies
4248
.. _Python Development Environment Setup Guide:
4349
https://cloud.google.com/python/setup
4450

45-
#. Create a virtualenv. Samples are compatible with Python 2.7 and 3.4+.
51+
#. Create a virtualenv. Samples are compatible with Python 3.6+.
4652

4753
.. code-block:: bash
4854
@@ -58,9 +64,15 @@ Install Dependencies
5864
.. _pip: https://pip.pypa.io/
5965
.. _virtualenv: https://virtualenv.pypa.io/
6066

67+
68+
69+
70+
71+
6172
Samples
6273
-------------------------------------------------------------------------------
6374

75+
6476
Quickstart
6577
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
6678

@@ -77,6 +89,8 @@ To run this sample:
7789
$ python quickstart.py
7890
7991
92+
93+
8094
List voices
8195
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
8296

@@ -93,6 +107,8 @@ To run this sample:
93107
$ python list_voices.py
94108
95109
110+
111+
96112
Synthesize text
97113
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
98114

@@ -108,6 +124,7 @@ To run this sample:
108124
109125
$ python synthesize_text.py
110126
127+
111128
usage: synthesize_text.py [-h] (--text TEXT | --ssml SSML)
112129
113130
Google Cloud Text-To-Speech API sample application .
@@ -123,6 +140,8 @@ To run this sample:
123140
124141
125142
143+
144+
126145
Synthesize file
127146
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
128147

@@ -138,6 +157,7 @@ To run this sample:
138157
139158
$ python synthesize_file.py
140159
160+
141161
usage: synthesize_file.py [-h] (--text TEXT | --ssml SSML)
142162
143163
Google Cloud Text-To-Speech API sample application .
@@ -153,6 +173,8 @@ To run this sample:
153173
154174
155175
176+
177+
156178
Audio profile
157179
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
158180

@@ -168,14 +190,15 @@ To run this sample:
168190
169191
$ python audio_profile.py
170192
193+
171194
usage: audio_profile.py [-h] [--output OUTPUT] [--text TEXT]
172195
[--effects_profile_id EFFECTS_PROFILE_ID]
173196
174197
Google Cloud Text-To-Speech API sample application for audio profile.
175198
176199
Example usage:
177200
python audio_profile.py --text "hello" --effects_profile_id
178-
"telephony-class-application"
201+
"telephony-class-application" --output "output.mp3"
179202
180203
optional arguments:
181204
-h, --help show this help message and exit
@@ -188,6 +211,10 @@ To run this sample:
188211
189212
190213
214+
215+
216+
217+
191218
The client library
192219
-------------------------------------------------------------------------------
193220

@@ -203,4 +230,5 @@ to `browse the source`_ and `report issues`_.
203230
https://github.com/GoogleCloudPlatform/google-cloud-python/issues
204231

205232

206-
.. _Google Cloud SDK: https://cloud.google.com/sdk/
233+
234+
.. _Google Cloud SDK: https://cloud.google.com/sdk/
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
# Copyright 2020 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+
# Default TEST_CONFIG_OVERRIDE for python repos.
16+
17+
# You can copy this file into your directory, then it will be inported from
18+
# the noxfile.py.
19+
20+
# The source of truth:
21+
# https://github.com/GoogleCloudPlatform/python-docs-samples/blob/master/noxfile_config.py
22+
23+
TEST_CONFIG_OVERRIDE = {
24+
# You can opt out from the test for specific Python versions.
25+
'ignored_versions': ["2.7"],
26+
27+
# An envvar key for determining the project id to use. Change it
28+
# to 'BUILD_SPECIFIC_GCLOUD_PROJECT' if you want to opt in using a
29+
# build specific Cloud project. You can also use your own string
30+
# to use your own Cloud project.
31+
'gcloud_project_env': 'GCLOUD_PROJECT',
32+
# 'gcloud_project_env': 'BUILD_SPECIFIC_GCLOUD_PROJECT',
33+
34+
# A dictionary you want to inject into your test. Don't put any
35+
# secrets here. These values will override predefined values.
36+
'envs': {},
37+
}

0 commit comments

Comments
 (0)