A collection of samples that demonstrate how to call the Google Cloud TextToSpeech API from C#.
This sample requires .NET Core 2.0 or later. That means using Visual Studio 2017, or the command line.
-
Follow the set-up instructions in the documentation.
-
Enable APIs for your project. Click here to visit Cloud Platform Console and enable the Google Cloud TextToSpeech API.
-
From a Powershell command line, run the QuickStart sample:
PS C:\...\dotnet-docs-samples\texttospeech\api\Quickstart> dotnet restore PS C:\...\dotnet-docs-samples\texttospeech\api\Quickstart> dotnet run # Creates 'sample.mp3' file in project folder
-
And run TextToSpeech to synthesize text to audio.
PS C:\..\dotnet-docs-samples\translate\api\Translate> dotnet restore PS C:\..\dotnet-docs-samples\translate\api\Translate> dotnet run synthesize "This is synthetic speech." # Creates 'output.mp3' file in project folder PS C:\..\dotnet-docs-samples\translate\api\Translate> dotnet run TextToSpeech 1.0.0 Copyright (C) 2018 TextToSpeech ERROR(S): No verb selected. list List available voices. synthesize Synthesize input to audio synthesize-file Synthesize a file to audio help Display more information on a specific command. version Display version information.
- See CONTRIBUTING.md
- See LICENSE
- See TESTING.md