MiraiForum

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

    silk4j--JVM的语音编码组件

    其他项目发布
    java cpp jni 语音 lib
    4
    4
    566
    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.
    • RainChan
      RainChan 摸鱼 last edited by

      项目地址mzdluo123/silk4j

      本项目用于方便大家编码QQ可识别的silk语音格式来轻松发送语音消息

      目前支持mp3转silk,pcm编码转silk

      开始使用

      // 要使用maven仓库导入,需要先为你的Github账号生成一个访问token才能正常拉取
      repositories {
         maven { 
           url 'https://maven.pkg.github.com/mzdluo123/silk4j'
           credentials {
                  username = '你的用户名'
                  password = '你的token'
              }
         }
      }
      dependencies {
          implementation("io.github.mzdluo123:silk4j:版本号")
      }
      

      版本号请到https://github.com/mzdluo123/silk4j/packages/ 查看

      你也可以到action下载最新构建的AllInOne中的jar使用

      // 请使用这个类完成编码
      // 所有的编码默认都只使用左声道
      public class AudioUtils {
          //使用之前需要初始化
          public static void init() throws IOException {
          }
          // 初始化时可选指定缓存目录,未指定则使用系统目录
          public static void init(File tmpDir) throws IOException {
            
          }
          // 以下为编码函数,只可以同时进行一个编码任务,如需pcm文件请看源代码
          // 返回的文件在缓存目录内,使用完毕请删除
          public static File mp3ToSilk(File mp3File) throws IOException {
             
          }
          public static File mp3ToSilk(InputStream mp3FileStream) throws IOException {
              
          }
      
          public static File silkToMp3(File silkFile) throws IOException {
            
          }
      
          public static File silkToMp3(InputStream silkFileStream) throws IOException {
              
          }
          
      }
      
      1 Reply Last reply Reply Quote 0
      • Z
        Zyilin98 last edited by

        大佬有时间处理一下GitHub上的issue吗,非常感谢。

        1 Reply Last reply Reply Quote 0
        • J
          Jadlokin-Scarlet last edited by

          怪了,怎么配置maven都Not authorized。

          1 Reply Last reply Reply Quote 0
          • W
            wangzhengyr last edited by

            大佬,,要怎么获取接受到的语音消息文件呀,OnlineAudio有个下载地址,但是下载下来的文件好像有问题,也没有后缀名啥的

            1 Reply Last reply Reply Quote 0
            • 1 / 1
            • First post
              Last post
            Powered by Mamoe Technologies & NodeBB | 友情链接 | 服务监控 | Contact