Added mp3 samples

This commit is contained in:
remsky 2024-12-31 03:48:26 -07:00
parent 607df6e03b
commit f800c4ecf9
11 changed files with 2 additions and 2 deletions

View file

@ -21,13 +21,13 @@ output_dir.mkdir(exist_ok=True)
def test_voice(voice: str): def test_voice(voice: str):
speech_file = output_dir / f"speech_{voice}.wav" speech_file = output_dir / f"speech_{voice}.mp3"
print(f"\nTesting voice: {voice}") print(f"\nTesting voice: {voice}")
print(f"Making request to {client.base_url}/audio/speech...") print(f"Making request to {client.base_url}/audio/speech...")
try: try:
response = client.audio.speech.create( response = client.audio.speech.create(
model="kokoro", voice=voice, input=SAMPLE_TEXT, response_format="wav" model="kokoro", voice=voice, input=SAMPLE_TEXT, response_format="mp3"
) )
print("Got response, saving to file...") print("Got response, saving to file...")

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.