MiraiForum

    • Register
    • Login
    • Search
    • Popular
    • Recent
    • Unsolved
    • Tags
    • Groups
    • 友情链接

    TTS 文字转语音 前置插件

    插件发布
    tts 文字转语音
    1
    1
    584
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • cssxsh
      cssxsh last edited by cssxsh

      Mirai TTS Plugin

      Mirai TTS 前置插件

      Mirai-Console的前置插件,用于将文本转换成语音等

      maven-central
      Build

      本插件使用的TTS API 返回的是 mp3 格式的语音,非手机端接收到语音可能播放不正常,
      你可以安装 Mirai Silk Converter 进行自动转码,解决mp3格式的问题。
      没有配置 AIP APP 信息时,将使用百度百科的接口,此接口只支持部分 person 。
      如需要更多的功能选择,请到 baidu aip 申请新应用和免费额度。

      在插件项目中引用

      repositories {
          mavenCentral()
      }
      
      dependencies {
          compileOnly("xyz.cssxsh.mirai:mirai-tts-plugin:${version}")
      }
      
      mirai {
          jvmTarget = JavaVersion.VERSION_11
      }
      

      管理指令

      • /tts test <person> <speed> <pitch> <volume> 测试 tts
        /tts test 4100 5 5 5
        你好 世界
        
      • /tts reload 重载 aip 配置

      配置

      TextToSpeech.yml

      • app_name AIP 配置
      • app_id AIP 配置
      • api_key AIP 配置
      • secret_key AIP 配置
      • option Speech 配置
        • speed: 语速 0~15
        • pitch: 语调 0~15
        • volume: 音量 0~15
        • person: 音库 详见 demo, 百度百科的接口只支持 0, 1, 3, 106, 4100, 4106
        • format: 格式
      1 Reply Last reply Reply Quote 1
      • 1 / 1
      • First post
        Last post
      Powered by Mamoe Technologies & NodeBB | 友情链接 | 服务监控 | Contact