@doufunao123/asset-gateway 0.14.1 → 0.14.3

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.
Files changed (2) hide show
  1. package/dist/index.js +20 -2
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -977,7 +977,7 @@ function createGenerateCommand() {
977
977
  ).requiredOption("--prompt <text>", "Text to synthesize").option("--voice <name>", "Qwen voice name or custom voice id", "Cherry").option(
978
978
  "--voice-id <id>",
979
979
  "ElevenLabs voice_id (use with --provider elevenlabs; routes to TTS API)"
980
- ).option("--language <lang>", "Language hint: Auto, Chinese, English, Japanese, etc.", "Auto").option("--model <model>", "Model id (Qwen TTS or ElevenLabs model_id)", "qwen3-tts-flash").option("--instructions <text>", "Natural language speaking instructions (for instruct models)").option("--provider <id>", "qwen_tts | elevenlabs").option("--output-dir <dir>", "Directory to save output", ".").action(async function(options) {
980
+ ).option("--language <lang>", "Language hint: Auto, Chinese, English, Japanese, etc.", "Auto").option("--model <model>", "Model id (default: auto-detect from voice; qwen3-tts-flash for built-in voices)").option("--instructions <text>", "Natural language speaking instructions (for instruct models)").option("--provider <id>", "qwen_tts | elevenlabs | voicebox").option("--profile-id <id>", "VoiceBox profile_id (use with --provider voicebox)").option("--output-dir <dir>", "Directory to save output", ".").action(async function(options) {
981
981
  try {
982
982
  const ctx = createContext(this);
983
983
  const params = {
@@ -986,12 +986,13 @@ function createGenerateCommand() {
986
986
  };
987
987
  if (options.instructions) params.instructions = options.instructions;
988
988
  if (options.voiceId) params.voice_id = options.voiceId;
989
+ if (options.profileId) params.profile_id = options.profileId;
989
990
  const body = {
990
991
  asset_type: "tts",
991
992
  prompt: options.prompt,
992
- model: options.model,
993
993
  params
994
994
  };
995
+ if (options.model) body.model = options.model;
995
996
  if (options.provider) body.provider = options.provider;
996
997
  const data = await ctx.client.post("/api/generate", body);
997
998
  const localPath = await saveOutput(data, "tts", options.outputDir);
@@ -1744,6 +1745,23 @@ function createVoiceCommand() {
1744
1745
  }
1745
1746
  })
1746
1747
  );
1748
+ command.addCommand(
1749
+ new Command9("create-custom").description("Design a custom voice and register it for self-hosted TTS (DashScope design \u2192 VoiceBox clone)").requiredOption("--prompt <text>", "Voice description (e.g. '\u5E74\u8F7B\u5973\u6027\uFF0C\u6E29\u6696\u4EB2\u5207\uFF0C\u6807\u51C6\u666E\u901A\u8BDD')").requiredOption("--preview-text <text>", "Sample text for voice preview").requiredOption("--name <name>", "Name for the custom voice").option("--language <lang>", "Language: zh, en, ja, ko, etc.", "zh").action(async function(options) {
1750
+ try {
1751
+ const ctx = createContext(this);
1752
+ const body = {
1753
+ voice_prompt: options.prompt,
1754
+ preview_text: options.previewText,
1755
+ name: options.name,
1756
+ language: options.language
1757
+ };
1758
+ const data = await ctx.client.post("/api/voice/create-custom", body);
1759
+ printSuccess("voice.create_custom", data, ctx);
1760
+ } catch (error2) {
1761
+ printError("voice.create_custom", error2);
1762
+ }
1763
+ })
1764
+ );
1747
1765
  command.addCommand(
1748
1766
  new Command9("list").description("List custom cloned or designed voices").option("--type <type>", "Voice type: vc or vd").action(async function(options) {
1749
1767
  try {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@doufunao123/asset-gateway",
3
- "version": "0.14.1",
3
+ "version": "0.14.3",
4
4
  "description": "Universal asset generation gateway CLI",
5
5
  "type": "module",
6
6
  "bin": {