Orate supports Google's speech and transcription services.
Google offers a wide range of speech and transcription services through their Large Language Models (LLMs), including Google Cloud Speech-to-Text and Google Cloud Text-to-Speech.
Setup
The Google provider is available by default in Orate. To import it, you can use the following code:
Configuration
The Google provider looks for the GOOGLE_API_KEY
environment variable. This variable is required for the provider to work. Simply add the following to your .env
file:
Usage
The Google provider provides a single interface for all of Google's speech and transcription services.
Text to Speech
The Google provider provides a tts
function that allows you to create a text-to-speech synthesis function using Google Cloud Text-to-Speech. By default, the tts
function uses the en-US-Casual-K
model.
You can specify the model to use by passing it as an argument to the tts
function.
You can also specify specific Google properties by passing them as an argument to the tts
function.
Speech to Text
The Google provider provides a stt
function that allows you to create a speech-to-text transcription function using Google Cloud Speech-to-Text. Google is unique in the fact that you need to specify a recognizer.
You can also specify specific Google properties by passing them as an argument to the stt
function.