docs on using vertex tts

This commit is contained in:
Ishaan Jaff 2024-08-23 17:57:49 -07:00
parent 225ff8432d
commit 8fada93fff
4 changed files with 36 additions and 25 deletions

View file

@ -0,0 +1,11 @@
import openai
client = openai.OpenAI(api_key="sk-1234", base_url="http://0.0.0.0:4000")
# # request sent to model set on litellm proxy, `litellm --model`
response = client.audio.speech.create(
model="vertex-tts",
input="the quick brown fox jumped over the lazy dogs",
voice={"languageCode": "en-US", "name": "en-US-Studio-O"}, # type: ignore
)
print("response from proxy", response) # noqa