Skip to content

Commit

Permalink
Revert "add loudness docs" (#57)
Browse files Browse the repository at this point in the history
  • Loading branch information
boli-bohan authored Jan 6, 2025
1 parent 3504ad8 commit 5eaa72f
Showing 1 changed file with 18 additions and 67 deletions.
85 changes: 18 additions & 67 deletions fern/definition/tts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ service:
path: /bytes
method: POST
display-name: Text to Speech (Bytes)
request: TTSBytesRequest
request: TTSRequest
response: file
examples:
- name: MP3
Expand All @@ -27,7 +27,6 @@ service:
container: "mp3"
sample_rate: 44100
bit_rate: 128000
loudness: -17
- name: WAV
request:
model_id: "sonic-english"
Expand All @@ -40,7 +39,6 @@ service:
container: "wav"
sample_rate: 44100
encoding: "pcm_f32le"
loudness: -17
- name: RAW
request:
model_id: "sonic-english"
Expand All @@ -53,13 +51,12 @@ service:
container: "raw"
sample_rate: 44100
encoding: "pcm_f32le"
loudness: -17

sse:
path: /sse
method: POST
display-name: Text to Speech (SSE)
request: TTSSSERequest
request: TTSRequest
response-stream:
type: WebSocketResponse
format: sse
Expand Down Expand Up @@ -325,6 +322,22 @@ types:
continue: optional<boolean>
context_id: optional<string>

TTSRequest:
properties:
model_id:
type: string
docs: |
The ID of the model to use for the generation. See [Models](/build-with-sonic/models) for available models.
transcript: string
voice: TTSRequestVoiceSpecifier
language: optional<SupportedLanguage>
output_format: OutputFormat
duration:
type: optional<double>
docs: |
The maximum duration of the audio in seconds. You do not usually need to specify this.
If the duration is not appropriate for the length of the transcript, the output audio may be truncated.
SupportedLanguage:
docs: |
The language that the given voice should speak the transcript in.
Expand Down Expand Up @@ -359,15 +372,6 @@ types:
encoding: RawEncoding
sample_rate: integer

RawBytesOutputFormat:
extends: RawOutputFormat
properties:
loudness:
type: optional<integer>
docs: |
The loudness of the audio in LUFS.
Supports values between -14 (loudest) and -24 (quietest).
RawEncoding:
enum:
- pcm_f32le
Expand All @@ -378,21 +382,13 @@ types:
WAVOutputFormat:
extends: RawOutputFormat

WAVBytesOutputFormat:
extends: RawBytesOutputFormat

MP3OutputFormat:
properties:
sample_rate: integer
bit_rate:
type: integer
docs: |
The bit rate of the audio in bits per second. Supported bit rates are 32000, 64000, 96000, 128000, 192000.
loudness:
type: optional<integer>
docs: |
The loudness of the audio in LUFS.
Supports values between -14 (loudest) and -24 (quietest).
TTSRequestVoiceSpecifier:
discriminated: false
Expand Down Expand Up @@ -478,48 +474,3 @@ types:
name: CURIOSITY_HIGH
- value: curiosity:highest
name: CURIOSITY_HIGHEST

TTSBytesRequest:
properties:
model_id:
type: string
docs: |
The ID of the model to use for the generation. See [Models](/build-with-sonic/models) for available models.
transcript: string
voice: TTSRequestVoiceSpecifier
language: optional<SupportedLanguage>
output_format: BytesOutputFormat
duration:
type: optional<double>
docs: |
The maximum duration of the audio in seconds. You do not usually need to specify this.
If the duration is not appropriate for the length of the transcript, the output audio may be truncated.
BytesOutputFormat:
discriminant: container
union:
raw: RawBytesOutputFormat
wav: WAVBytesOutputFormat
mp3: MP3OutputFormat

TTSSSERequest:
properties:
model_id:
type: string
docs: |
The ID of the model to use for the generation. See [Models](/build-with-sonic/models) for available models.
transcript: string
voice: TTSRequestVoiceSpecifier
language: optional<SupportedLanguage>
output_format: SSEOutputFormat
duration:
type: optional<double>
docs: |
The maximum duration of the audio in seconds. You do not usually need to specify this.
If the duration is not appropriate for the length of the transcript, the output audio may be truncated.
SSEOutputFormat:
discriminant: container
union:
raw: RawOutputFormat
wav: WAVOutputFormat

0 comments on commit 5eaa72f

Please sign in to comment.