Skip to content

Commit 5bd1d92

Browse files
author
Dev Dairy
committed
update wit WIP
1 parent 7aa21a3 commit 5bd1d92

File tree

32 files changed

+772
-778
lines changed

32 files changed

+772
-778
lines changed

test/tts/wit/deps/golem-tts/golem-tts.wit

Lines changed: 23 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -164,32 +164,21 @@ interface types {
164164
interface voices {
165165
use types.{tts-error, language-code, voice-settings, voice-gender };
166166

167-
/// Represents a voice that can be used for speech synthesis
168-
resource voice {
169-
/// Get voice identification
170-
get-id: func() -> string;
171-
get-name: func() -> string;
172-
get-provider-id: func() -> option<string>;
173-
174-
/// Get voice characteristics
175-
get-language: func() -> language-code;
176-
get-additional-languages: func() -> list<language-code>;
177-
get-gender: func() -> voice-gender;
178-
get-quality: func() -> string;
179-
get-description: func() -> option<string>;
180-
181-
/// Voice capabilities
182-
supports-ssml: func() -> bool;
183-
get-sample-rates: func() -> list<u32>;
184-
get-supported-formats: func() -> list<string>;
185-
186-
/// Voice management (may return unsupported-operation)
187-
update-settings: func(settings: voice-settings) -> result<_, tts-error>;
188-
delete: func() -> result<_, tts-error>;
189-
clone: func() -> result<voice, tts-error>;
190-
191-
/// Preview voice with sample text
192-
preview: func(text: string) -> result<list<u8>, tts-error>;
167+
record voice {
168+
id: string,
169+
name: string,
170+
provider-id: option<string>,
171+
172+
language: language-code,
173+
additional-languages: list<language-code>,
174+
gender: voice-gender,
175+
quality: string,
176+
description: option<string>,
177+
178+
supports-ssml: bool,
179+
sample-rates: list<u32>,
180+
supported-formats: list<string>,
181+
preview-url: option<string>,
193182
}
194183

195184
/// Voice search and filtering
@@ -272,27 +261,27 @@ interface synthesis {
272261
/// Convert text to speech (removed async)
273262
synthesize: func(
274263
input: text-input,
275-
voice: borrow<voice>,
264+
voice: voice,
276265
options: option<synthesis-options>
277266
) -> result<synthesis-result, tts-error>;
278267

279268
/// Batch synthesis for multiple inputs (removed async)
280269
synthesize-batch: func(
281270
inputs: list<text-input>,
282-
voice: borrow<voice>,
271+
voice: voice,
283272
options: option<synthesis-options>
284273
) -> result<list<synthesis-result>, tts-error>;
285274

286275
/// Get timing information without audio synthesis
287276
get-timing-marks: func(
288277
input: text-input,
289-
voice: borrow<voice>
278+
voice: voice
290279
) -> result<list<timing-info>, tts-error>;
291280

292281
/// Validate text before synthesis
293282
validate-input: func(
294283
input: text-input,
295-
voice: borrow<voice>
284+
voice: voice
296285
) -> result<validation-result, tts-error>;
297286

298287
record validation-result {
@@ -344,13 +333,13 @@ interface streaming {
344333

345334
/// Create streaming synthesis session
346335
create-stream: func(
347-
voice: borrow<voice>,
336+
voice: voice,
348337
options: option<synthesis-options>
349338
) -> result<synthesis-stream, tts-error>;
350339

351340
/// Real-time voice conversion streaming
352341
create-voice-conversion-stream: func(
353-
target-voice: borrow<voice>,
342+
target-voice: voice,
354343
options: option<synthesis-options>
355344
) -> result<voice-conversion-stream, tts-error>;
356345

@@ -409,7 +398,7 @@ interface advanced {
409398
/// Voice-to-voice conversion (removed async)
410399
convert-voice: func(
411400
input-audio: list<u8>,
412-
target-voice: borrow<voice>,
401+
target-voice: voice,
413402
preserve-timing: option<bool>
414403
) -> result<list<u8>, tts-error>;
415404

@@ -452,7 +441,7 @@ interface advanced {
452441
/// Long-form content synthesis with optimization (removed async)
453442
synthesize-long-form: func(
454443
content: string,
455-
voice: borrow<voice>,
444+
voice: voice,
456445
output-location: string,
457446
chapter-breaks: option<list<u32>>
458447
) -> result<long-form-operation, tts-error>;

tts/Makefile.toml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ run_task = { name = [
3737
[tasks.build-polly]
3838
install_crate = { crate_name = "cargo-component", version = "0.20.0" }
3939
command = "cargo-component"
40-
args = ["build", "-p", "golem-tts-polly"]
40+
args = ["build", "-p", "golem-tts-polly", "--features", "golem-tts/durability"]
4141

4242
[tasks.build-polly-portable]
4343
install_crate = { crate_name = "cargo-component", version = "0.20.0" }
@@ -47,7 +47,7 @@ args = ["build", "-p", "golem-tts-polly", "--no-default-features"]
4747
[tasks.build-deepgram]
4848
install_crate = { crate_name = "cargo-component", version = "0.20.0" }
4949
command = "cargo-component"
50-
args = ["build", "-p", "golem-tts-deepgram"]
50+
args = ["build", "-p", "golem-tts-deepgram", "--features", "golem-tts/durability"]
5151

5252
[tasks.build-deepgram-portable]
5353
install_crate = { crate_name = "cargo-component", version = "0.20.0" }
@@ -57,7 +57,7 @@ args = ["build", "-p", "golem-tts-deepgram", "--no-default-features"]
5757
[tasks.build-google]
5858
install_crate = { crate_name = "cargo-component", version = "0.20.0" }
5959
command = "cargo-component"
60-
args = ["build", "-p", "golem-tts-google"]
60+
args = ["build", "-p", "golem-tts-google", "--features", "golem-tts/durability"]
6161

6262
[tasks.build-google-portable]
6363
install_crate = { crate_name = "cargo-component", version = "0.20.0" }
@@ -67,7 +67,7 @@ args = ["build", "-p", "golem-tts-google", "--no-default-features"]
6767
[tasks.build-elevenlabs]
6868
install_crate = { crate_name = "cargo-component", version = "0.20.0" }
6969
command = "cargo-component"
70-
args = ["build", "-p", "golem-tts-elevenlabs"]
70+
args = ["build", "-p", "golem-tts-elevenlabs", "--features", "golem-tts/durability"]
7171

7272
[tasks.build-elevenlabs-portable]
7373
install_crate = { crate_name = "cargo-component", version = "0.20.0" }
@@ -77,7 +77,7 @@ args = ["build", "-p", "golem-tts-elevenlabs", "--no-default-features"]
7777
[tasks.release-build-polly]
7878
install_crate = { crate_name = "cargo-component", version = "0.20.0" }
7979
command = "cargo-component"
80-
args = ["build", "-p", "golem-tts-polly", "--release"]
80+
args = ["build", "-p", "golem-tts-polly", "--release", "--features", "golem-tts/durability"]
8181

8282
[tasks.release-build-polly-portable]
8383
install_crate = { crate_name = "cargo-component", version = "0.20.0" }
@@ -93,7 +93,7 @@ args = [
9393
[tasks.release-build-deepgram]
9494
install_crate = { crate_name = "cargo-component", version = "0.20.0" }
9595
command = "cargo-component"
96-
args = ["build", "-p", "golem-tts-deepgram", "--release"]
96+
args = ["build", "-p", "golem-tts-deepgram", "--release", "--features", "golem-tts/durability"]
9797

9898
[tasks.release-build-deepgram-portable]
9999
install_crate = { crate_name = "cargo-component", version = "0.20.0" }
@@ -109,7 +109,7 @@ args = [
109109
[tasks.release-build-google]
110110
install_crate = { crate_name = "cargo-component", version = "0.20.0" }
111111
command = "cargo-component"
112-
args = ["build", "-p", "golem-tts-google", "--release"]
112+
args = ["build", "-p", "golem-tts-google", "--release", "--features", "golem-tts/durability"]
113113

114114
[tasks.release-build-google-portable]
115115
install_crate = { crate_name = "cargo-component", version = "0.20.0" }
@@ -119,7 +119,7 @@ args = ["build", "-p", "golem-tts-google", "--release", "--no-default-features"]
119119
[tasks.release-build-elevenlabs]
120120
install_crate = { crate_name = "cargo-component", version = "0.20.0" }
121121
command = "cargo-component"
122-
args = ["build", "-p", "golem-tts-elevenlabs", "--release"]
122+
args = ["build", "-p", "golem-tts-elevenlabs", "--release", "--features", "golem-tts/durability"]
123123

124124
[tasks.release-build-elevenlabs-portable]
125125
install_crate = { crate_name = "cargo-component", version = "0.20.0" }

0 commit comments

Comments
 (0)