Skip to content

Commit

Permalink
fix: move samples into samples/snippets
Browse files Browse the repository at this point in the history
  • Loading branch information
busunkim96 committed May 20, 2020
1 parent fb03368 commit 1d31a0b
Show file tree
Hide file tree
Showing 2 changed files with 68 additions and 3 deletions.
34 changes: 31 additions & 3 deletions texttospeech/snippets/README.rst
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@

.. This file is automatically generated. Do not edit this file directly.
Google Cloud Text-to-Speech API Python Samples
Expand All @@ -14,10 +15,12 @@ This directory contains samples for Google Cloud Text-to-Speech API. The `Google

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


Setup
-------------------------------------------------------------------------------



Authentication
++++++++++++++

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




Install Dependencies
++++++++++++++++++++

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

#. Create a virtualenv. Samples are compatible with Python 2.7 and 3.4+.
#. Create a virtualenv. Samples are compatible with Python 3.6+.

.. code-block:: bash
Expand All @@ -58,9 +64,15 @@ Install Dependencies
.. _pip: https://pip.pypa.io/
.. _virtualenv: https://virtualenv.pypa.io/






Samples
-------------------------------------------------------------------------------


Quickstart
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Expand All @@ -77,6 +89,8 @@ To run this sample:
$ python quickstart.py
List voices
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Expand All @@ -93,6 +107,8 @@ To run this sample:
$ python list_voices.py
Synthesize text
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Expand All @@ -108,6 +124,7 @@ To run this sample:
$ python synthesize_text.py
usage: synthesize_text.py [-h] (--text TEXT | --ssml SSML)
Google Cloud Text-To-Speech API sample application .
Expand All @@ -123,6 +140,8 @@ To run this sample:
Synthesize file
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Expand All @@ -138,6 +157,7 @@ To run this sample:
$ python synthesize_file.py
usage: synthesize_file.py [-h] (--text TEXT | --ssml SSML)
Google Cloud Text-To-Speech API sample application .
Expand All @@ -153,6 +173,8 @@ To run this sample:
Audio profile
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Expand All @@ -168,14 +190,15 @@ To run this sample:
$ python audio_profile.py
usage: audio_profile.py [-h] [--output OUTPUT] [--text TEXT]
[--effects_profile_id EFFECTS_PROFILE_ID]
Google Cloud Text-To-Speech API sample application for audio profile.
Example usage:
python audio_profile.py --text "hello" --effects_profile_id
"telephony-class-application"
"telephony-class-application" --output "output.mp3"
optional arguments:
-h, --help show this help message and exit
Expand All @@ -188,6 +211,10 @@ To run this sample:
The client library
-------------------------------------------------------------------------------

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


.. _Google Cloud SDK: https://cloud.google.com/sdk/

.. _Google Cloud SDK: https://cloud.google.com/sdk/
37 changes: 37 additions & 0 deletions texttospeech/snippets/noxfile_config.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# Default TEST_CONFIG_OVERRIDE for python repos.

# You can copy this file into your directory, then it will be inported from
# the noxfile.py.

# The source of truth:
# https://github.com/GoogleCloudPlatform/python-docs-samples/blob/master/noxfile_config.py

TEST_CONFIG_OVERRIDE = {
# You can opt out from the test for specific Python versions.
'ignored_versions': ["2.7"],

# An envvar key for determining the project id to use. Change it
# to 'BUILD_SPECIFIC_GCLOUD_PROJECT' if you want to opt in using a
# build specific Cloud project. You can also use your own string
# to use your own Cloud project.
'gcloud_project_env': 'GCLOUD_PROJECT',
# 'gcloud_project_env': 'BUILD_SPECIFIC_GCLOUD_PROJECT',

# A dictionary you want to inject into your test. Don't put any
# secrets here. These values will override predefined values.
'envs': {},
}

0 comments on commit 1d31a0b

Please sign in to comment.