mirror of
https://github.com/remsky/Kokoro-FastAPI.git
synced 2025-08-31 21:59:28 +00:00
Added mp3 samples
This commit is contained in:
parent
607df6e03b
commit
f800c4ecf9
11 changed files with 2 additions and 2 deletions
|
@ -21,13 +21,13 @@ output_dir.mkdir(exist_ok=True)
|
|||
|
||||
|
||||
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"Making request to {client.base_url}/audio/speech...")
|
||||
|
||||
try:
|
||||
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...")
|
||||
|
|
BIN
examples/voice_samples/speech_af.mp3
Normal file
BIN
examples/voice_samples/speech_af.mp3
Normal file
Binary file not shown.
BIN
examples/voice_samples/speech_af_bella.mp3
Normal file
BIN
examples/voice_samples/speech_af_bella.mp3
Normal file
Binary file not shown.
BIN
examples/voice_samples/speech_af_nicole.mp3
Normal file
BIN
examples/voice_samples/speech_af_nicole.mp3
Normal file
Binary file not shown.
BIN
examples/voice_samples/speech_af_sarah.mp3
Normal file
BIN
examples/voice_samples/speech_af_sarah.mp3
Normal file
Binary file not shown.
BIN
examples/voice_samples/speech_am_adam.mp3
Normal file
BIN
examples/voice_samples/speech_am_adam.mp3
Normal file
Binary file not shown.
BIN
examples/voice_samples/speech_am_michael.mp3
Normal file
BIN
examples/voice_samples/speech_am_michael.mp3
Normal file
Binary file not shown.
BIN
examples/voice_samples/speech_bf_emma.mp3
Normal file
BIN
examples/voice_samples/speech_bf_emma.mp3
Normal file
Binary file not shown.
BIN
examples/voice_samples/speech_bf_isabella.mp3
Normal file
BIN
examples/voice_samples/speech_bf_isabella.mp3
Normal file
Binary file not shown.
BIN
examples/voice_samples/speech_bm_george.mp3
Normal file
BIN
examples/voice_samples/speech_bm_george.mp3
Normal file
Binary file not shown.
BIN
examples/voice_samples/speech_bm_lewis.mp3
Normal file
BIN
examples/voice_samples/speech_bm_lewis.mp3
Normal file
Binary file not shown.
Loading…
Add table
Reference in a new issue