Skip to content

Commit

Permalink
Add examples (#33)
Browse files Browse the repository at this point in the history
  • Loading branch information
noahlt authored Nov 2, 2024
1 parent f503cff commit a929285
Show file tree
Hide file tree
Showing 2 changed files with 75 additions and 0 deletions.
37 changes: 37 additions & 0 deletions fern/definition/tts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,43 @@ service:
method: POST
display-name: Text to Speech (Bytes)
request: TTSRequest
examples:
- name: MP3
request:
model_id: "sonic-english"
transcript: "Hello, world!"
voice:
mode: "id"
id: "694f9389-aac1-45b6-b726-9d9369183238"
language: "en"
output_format:
container: "mp3"
sample_rate: 44100
bit_rate: 128000
- name: WAV
request:
model_id: "sonic-english"
transcript: "Hello, world!"
voice:
mode: "id"
id: "694f9389-aac1-45b6-b726-9d9369183238"
language: "en"
output_format:
container: "wav"
sample_rate: 44100
encoding: "pcm_f32le"
- name: RAW
request:
model_id: "sonic-english"
transcript: "Hello, world!"
voice:
mode: "id"
id: "694f9389-aac1-45b6-b726-9d9369183238"
language: "en"
output_format:
container: "raw"
sample_rate: 44100
encoding: "pcm_f32le"

sse:
path: /sse
Expand Down
38 changes: 38 additions & 0 deletions fern/definition/voice-changer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,25 @@ service:
docs: |
Required for MP3 and WAV containers.
response: file
examples:
- name: MP3
request:
voice[id]: "694f9389-aac1-45b6-b726-9d9369183238"
output_format[container]: mp3
output_format[sample_rate]: 44100
output_format[bit_rate]: 128000
- name: WAV
request:
voice[id]: "694f9389-aac1-45b6-b726-9d9369183238"
output_format[container]: wav
output_format[sample_rate]: 44100
output_format[encoding]: pcm_f32le
- name: RAW
request:
voice[id]: "694f9389-aac1-45b6-b726-9d9369183238"
output_format[container]: raw
output_format[sample_rate]: 44100
output_format[encoding]: pcm_f32le

sse:
path: /sse
Expand Down Expand Up @@ -60,6 +79,25 @@ service:
docs: |
Required for MP3 and WAV containers.
response-stream: StreamingResponse
examples:
- name: MP3
request:
voice[id]: "694f9389-aac1-45b6-b726-9d9369183238"
output_format[container]: mp3
output_format[sample_rate]: 44100
output_format[bit_rate]: 128000
- name: WAV
request:
voice[id]: "694f9389-aac1-45b6-b726-9d9369183238"
output_format[container]: wav
output_format[sample_rate]: 44100
output_format[encoding]: pcm_f32le
- name: RAW
request:
voice[id]: "694f9389-aac1-45b6-b726-9d9369183238"
output_format[container]: raw
output_format[sample_rate]: 44100
output_format[encoding]: pcm_f32le

types:
OutputFormatContainer:
Expand Down

0 comments on commit a929285

Please sign in to comment.