This package allows you to convert text into spoken words using Google Cloud's text-to-speech functionality. To get started, simply enter your API key in the 'TEXT_TO_SPEECH' prefab. For a demonstration of how to use this package, open the 'Example scene' in the 'GoogleTextToSpeech\Scenes' folder.
To convert text to an audio clip, use the 'GetSpeechAudioFromGoogle' method from the 'TextToSpeech' class. This method takes four parameters:
string textToConvert - the text to convert
VoiceScriptableObject voice - voice options
Action audioClipReceived - executed in case of successful conversion
Action errorReceived - executed in case of an error
You can find pre-made voice options in the 'GoogleTextToSpeech\Voices' folder. Alternatively, you can create a new set of voice options using the 'Create/GoogleTextToSpeech/Voice' menu.





