diff --git a/jcommon/ai/minimax/src/main/java/run/mone/ai/minimax/MiniMax.java b/jcommon/ai/minimax/src/main/java/run/mone/ai/minimax/MiniMax.java index b313771f3..339f9357d 100644 --- a/jcommon/ai/minimax/src/main/java/run/mone/ai/minimax/MiniMax.java +++ b/jcommon/ai/minimax/src/main/java/run/mone/ai/minimax/MiniMax.java @@ -24,7 +24,7 @@ public static byte[] call_Text_To_Speech(String groupId, String authorization, R throw new RuntimeException("content is null"); } - if (content.getText() == null) { + if (content.getText() == null || content.getText().trim().length() < 1) { throw new RuntimeException("content.text is null"); } diff --git a/jcommon/ai/minimax/src/main/java/run/mone/ai/minimax/bo/ModelEnum.java b/jcommon/ai/minimax/src/main/java/run/mone/ai/minimax/bo/ModelEnum.java index c5ff6d71d..c76b4251d 100644 --- a/jcommon/ai/minimax/src/main/java/run/mone/ai/minimax/bo/ModelEnum.java +++ b/jcommon/ai/minimax/src/main/java/run/mone/ai/minimax/bo/ModelEnum.java @@ -2,12 +2,15 @@ public enum ModelEnum { - Speech01("speech-01"), - Speech02("speech-02"); + Speech01("speech-01", "中文"), + Speech02("speech-02", "中文、英文、中英混合、日文、韩文"); public String modelName; - ModelEnum(String name) { + public String description; + + ModelEnum(String name, String description) { this.modelName = name; + this.description = description; } } diff --git a/jcommon/ai/minimax/src/main/java/run/mone/ai/minimax/bo/OutputFormat.java b/jcommon/ai/minimax/src/main/java/run/mone/ai/minimax/bo/OutputFormat.java new file mode 100644 index 000000000..c90fd7fd5 --- /dev/null +++ b/jcommon/ai/minimax/src/main/java/run/mone/ai/minimax/bo/OutputFormat.java @@ -0,0 +1,16 @@ +package run.mone.ai.minimax.bo; + +public enum OutputFormat { + + mp3("mp3"), + wav("wav"), + pcm("pcm"), + flac("flac"), + aac("aac"); + + public String outputFormat; + + OutputFormat(String OutputFormat){ + this.outputFormat = OutputFormat; + } +} diff --git a/jcommon/ai/minimax/src/main/java/run/mone/ai/minimax/bo/RequestBodyContent.java b/jcommon/ai/minimax/src/main/java/run/mone/ai/minimax/bo/RequestBodyContent.java index d001e3bb7..995298233 100644 --- a/jcommon/ai/minimax/src/main/java/run/mone/ai/minimax/bo/RequestBodyContent.java +++ b/jcommon/ai/minimax/src/main/java/run/mone/ai/minimax/bo/RequestBodyContent.java @@ -35,5 +35,5 @@ public class RequestBodyContent { * 默认值为mp3,可选范围:mp3、wav、pcm、flac、aac */ @Builder.Default - private String output_format = "mp3"; + private String output_format = OutputFormat.mp3.outputFormat; } diff --git a/jcommon/ai/minimax/src/main/java/run/mone/ai/minimax/bo/VoiceIdEnum.java b/jcommon/ai/minimax/src/main/java/run/mone/ai/minimax/bo/VoiceIdEnum.java index 317d2e86b..df2815ce9 100644 --- a/jcommon/ai/minimax/src/main/java/run/mone/ai/minimax/bo/VoiceIdEnum.java +++ b/jcommon/ai/minimax/src/main/java/run/mone/ai/minimax/bo/VoiceIdEnum.java @@ -5,116 +5,119 @@ public enum VoiceIdEnum { /** * 青涩青年音色:male-qn-qingse */ - male_qn_qingse("male-qn-qingse"), + male_qn_qingse("male-qn-qingse","青涩青年音色"), /** * 精英青年音色:male-qn-jingying */ - male_qn_jingying("male-qn-jingying"), + male_qn_jingying("male-qn-jingying","精英青年音色"), /** * 霸道青年音色:male-qn-badao */ - male_qn_badao("male-qn-badao"), + male_qn_badao("male-qn-badao","霸道青年音色"), /** * 青年大学生音色:male-qn-daxuesheng */ - male_qn_daxuesheng("male-qn-daxuesheng"), + male_qn_daxuesheng("male-qn-daxuesheng","青年大学生音色"), /** * 少女音色:female-shaonv */ - female_shaonv("female-shaonv"), + female_shaonv("female-shaonv","少女音色"), /** * 御姐音色:female-yujie */ - female_yujie("female-yujie"), + female_yujie("female-yujie", "御姐音色"), /** * 成熟女性音色:female-chengshu */ - female_chengshu("female-chengshu"), + female_chengshu("female-chengshu", "成熟女性音色"), /** * 甜美女性音色:female-tianmei */ - female_tianmei("female-tianmei"), + female_tianmei("female-tianmei", "甜美女性音色"), /** * 男性主持人:presenter_male */ - presenter_male("presenter_male"), + presenter_male("presenter_male","男性主持人"), /** * 女性主持人:presenter_female */ - presenter_female("presenter_female"), + presenter_female("presenter_female","女性主持人"), /** * 男性有声书1:audiobook_male_1 */ - audiobook_male_1("audiobook_male_1"), + audiobook_male_1("audiobook_male_1","男性有声书1"), /** * 男性有声书2:audiobook_male_2 */ - audiobook_male_2("audiobook_male_2"), + audiobook_male_2("audiobook_male_2","男性有声书2"), /** * 女性有声书1:audiobook_female_1 */ - audiobook_female_1("audiobook_female_1"), + audiobook_female_1("audiobook_female_1","女性有声书1"), /** * 女性有声书2:audiobook_female_2 */ - audiobook_female_2("audiobook_female_2"), + audiobook_female_2("audiobook_female_2","女性有声书2"), /** * 青涩青年音色-beta:male-qn-qingse-jingpin */ - male_qn_qingse_jingpin("male-qn-qingse-jingpin"), + male_qn_qingse_jingpin("male-qn-qingse-jingpin","青涩青年音色-beta"), /** * 精英青年音色-beta:male-qn-jingying-jingpin */ - male_qn_jingying_jingpin("male-qn-jingying-jingpin"), + male_qn_jingying_jingpin("male-qn-jingying-jingpin","精英青年音色-beta"), /** * 霸道青年音色-beta:male-qn-badao-jingpin */ - male_qn_badao_jingpin("male-qn-badao-jingpin"), + male_qn_badao_jingpin("male-qn-badao-jingpin","霸道青年音色-beta"), /** * 青年大学生音色-beta:male-qn-daxuesheng-jingpin */ - male_qn_daxuesheng_jingpin("male-qn-daxuesheng-jingpin"), + male_qn_daxuesheng_jingpin("male-qn-daxuesheng-jingpin","青年大学生音色-beta"), /** * 少女音色-beta:female-shaonv-jingpin */ - female_shaonv_jingpin("female-shaonv-jingpin"), + female_shaonv_jingpin("female-shaonv-jingpin","少女音色-beta"), /** * 御姐音色-beta:female-yujie-jingpin */ - female_yujie_jingpin("female-yujie-jingpin"), + female_yujie_jingpin("female-yujie-jingpin","御姐音色-beta"), /** * 成熟女性音色-beta:female-chengshu-jingpin */ - female_chengshu_jingpin("female-chengshu-jingpin"), + female_chengshu_jingpin("female-chengshu-jingpin","成熟女性音色-beta"), /** * 甜美女性音色-beta:female-tianmei-jingpin */ - female_tianmei_jingpin("female-tianmei-jingpin"); + female_tianmei_jingpin("female-tianmei-jingpin","甜美女性音色-beta"); public String voiceId; - VoiceIdEnum(String id) { + public String description; + + VoiceIdEnum(String id, String description) { this.voiceId = id; + this.description = description; } }