@doufunao123/asset-gateway 0.6.0 → 0.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +7 -7
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -586,20 +586,20 @@ function createGenerateCommand() {
|
|
|
586
586
|
})
|
|
587
587
|
);
|
|
588
588
|
command.addCommand(
|
|
589
|
-
new Command3("tts").description("Text-to-speech synthesis
|
|
589
|
+
new Command3("tts").description("Text-to-speech synthesis via Qwen3-TTS").requiredOption("--prompt <text>", "Text to synthesize").option("--voice <name>", "Voice name or custom voice ID", "Cherry").option("--language <lang>", "Language hint: Auto, Chinese, English, Japanese, etc.", "Auto").option("--model <model>", "Qwen3-TTS model", "qwen3-tts-flash").option("--instructions <text>", "Natural language speaking instructions (for instruct models)").option("--provider <id>", "Provider to use").option("--output-dir <dir>", "Directory to save output", ".").action(async function(options) {
|
|
590
590
|
try {
|
|
591
591
|
const ctx = createContext(this);
|
|
592
|
-
const params = {
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
if (options.
|
|
592
|
+
const params = {
|
|
593
|
+
voice: options.voice,
|
|
594
|
+
language_type: options.language
|
|
595
|
+
};
|
|
596
|
+
if (options.instructions) params.instructions = options.instructions;
|
|
597
597
|
const body = {
|
|
598
598
|
asset_type: "tts",
|
|
599
599
|
prompt: options.prompt,
|
|
600
|
+
model: options.model,
|
|
600
601
|
params
|
|
601
602
|
};
|
|
602
|
-
if (options.model) body.model = options.model;
|
|
603
603
|
if (options.provider) body.provider = options.provider;
|
|
604
604
|
const data = await ctx.client.post("/api/generate", body);
|
|
605
605
|
const localPath = await saveOutput(data, "tts", options.outputDir);
|