MiraiForum

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

    【萌新求助】Audio发送成功,但客户端显示不太正常

    开发交流
    2
    3
    349
    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.
    • Y
      Ycituss last edited by

      想实现发送本地声音文件的功能,测试的时候出现了问题,有没有大佬帮忙看看
      mirai版本是2.7.1
      这是代码

              ExternalResource is = null;
              File file = new File("./data/test/api.amr");
              try {
                  is = ExternalResource.create(file);
              } catch (Exception e) {
                  e.printStackTrace();
              }
              Audio uploadAudio = NewsYcitus.getCurrentBot().getGroups().stream().findAny().get().uploadAudio(is);
              is.close();
              try {
                  NewsYcitus.getCurrentBot().getGroup(fromGroup).sendMessage(uploadAudio);
              } catch (IllegalStateException e) {
                  LoggerManager.logDebug("SendSystem",
                          "IllegalStateException: Group = " + fromGroup);
              }
      

      电脑上接收到后听不到任何内容,如下图
      I1HP%%EO`R$Y@SOQ${TTD$I.png
      手机显示正常,可以正常听到音频文件内容,如下
      6WU2@OBNM(WNV~5MS(}VMDD.png

      这是什么原因造成的呢,有没有什么解决办法

      1 Reply Last reply Reply Quote 0
      • MrXiaoM
        MrXiaoM 童心未泯 last edited by

        https://github.com/project-mirai/mirai-silk-converter

        Y 1 Reply Last reply Reply Quote 0
        • Y
          Ycituss @MrXiaoM last edited by

          @MrXiaoM 感谢

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