~kf5jwc/garretts-plugin-google

9b0537b41a1155ed919fae5d63e458c8b6f4a7fa — Kyle Jones 1 year, 5 months ago 69b8052 master
Rename to GarreTTS
6 files changed, 5 insertions(+), 11 deletions(-)

R text_synthesizer_plugin_google/{__init__.py => .py}
R text_synthesizer_plugin_google/{__main__.py => .py}
R text_synthesizer_plugin_google/{exception_handler.py => n_handler.py}
R text_synthesizer_plugin_google/{google.py => y}
R text_synthesizer_plugin_google/{plugin_files.py => iles.py}
M pyproject.toml
R text_synthesizer_plugin_google/__init__.py => garretts_plugin_google/__init__.py +0 -0

R text_synthesizer_plugin_google/__main__.py => garretts_plugin_google/__main__.py +0 -0

R text_synthesizer_plugin_google/exception_handler.py => garretts_plugin_google/exception_handler.py +0 -0

R text_synthesizer_plugin_google/google.py => garretts_plugin_google/google.py +2 -4
@@ 1,7 1,7 @@
from google.cloud import texttospeech
from typing import BinaryIO, List

# [START tts_synthesize_text]

def synthesize_text(text, name=None) -> BinaryIO:
    """Synthesizes speech from the input string of text."""
    client = texttospeech.TextToSpeechClient()


@@ 28,9 28,8 @@ def synthesize_text(text, name=None) -> BinaryIO:
    response = client.synthesize_speech(input_text, voice, audio_config)

    return response.audio_content
# [END tts_synthesize_text]

# [START tts_list_voices]

def list_voices() -> List[str]:
    """Lists the available voices."""
    client = texttospeech.TextToSpeechClient()


@@ 59,4 58,3 @@ def list_voices() -> List[str]:

        # Display the natural sample rate hertz for this voice. Example: 24000
        print("Natural Sample Rate Hertz: {}\n".format(voice.natural_sample_rate_hertz))
# [END tts_list_voices]

R text_synthesizer_plugin_google/plugin_files.py => garretts_plugin_google/plugin_files.py +0 -0

M pyproject.toml => pyproject.toml +3 -7
@@ 3,21 3,17 @@ requires = ["flit"]
build-backend = "flit.buildapi"

[tool.flit.metadata]
module = "text_synthesizer_plugin_google"
module = "garretts_plugin_google"
author = "Kyle Jones"
author-email = "kyle@kf5jwc.us"
requires-python = ">=3.7"
requires = [
	"text_synthesizer",
	"garretts",
	"google-cloud-texttospeech",
]

[tool.flit.metadata.requires-extra]
french = []
english = []

[tool.flit.entrypoints.gather]
package = "text_synthesizer_plugin_google"
package = "garretts_plugin_google"

[tool.black]
line-length = 88