MiraiForum

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

    怎么下载群语音消息(链接)?

    开发交流
    2
    5
    92
    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.
    • CherryPeel
      CherryPeel last edited by

      按照官方文档
      a3d04d06-0300-4b72-8277-64489af36279-241398f8cad62ceafa9dad354dc34f2a.jpg /Users/cherrypeel/Library/Containers/com.tencent.qq/Data/Library/Application Support/QQ/nt_qq_b48e2142bb9e44f5020dc45cc5c0d3b4/nt_data/Pic/2023-03/Ori/241398f8cad62ceafa9dad354dc34f2a.jpg

      这个url可以直接下载,于是乎我就复制到浏览器,发现下载后无法播放,然后又试了试爬虫,然后也无法正常播放,求解。
      7f43481b-d122-411c-9a29-418afc6610e8-image.png

      语音消息:(群内可正常播放)
      {'type': 'GroupMessage', 'messageChain': [{'type': 'Source', 'id': 229324, 'time': 1677763243}, {'type': 'Voice', 'voiceId': '01A219E94FFAB8C22970801E05C89E69.amr', 'url': 'http://grouptalk.c2c.qq.com/?ver=0&rkey=3062020101045b3059020101020101020451b6903b042439306a335646796c4e5554646a356d30794368576646664b32443273305768313858707102046400a2ab041f0000000866696c6574797065000000013100000005636f64656300000001310400&filetype=1&voice_codec=1', 'path': None, 'base64': None, 'length': 3}], 'sender': {'id': 21xxxxxxxx, 'memberName': 'Coco~', 'specialTitle': '', 'permission': 'OWNER', 'joinTimestamp': 166xxx651, 'lastSpeakTimestamp': 16xxxxx, 'muteTimeRemaining': 0, 'group': {'id': 6753xxxxxx, 'name': '开发测试', 'permission': 'ADMINISTRATOR'}}}

      1 Reply Last reply Reply Quote 0
      • CherryPeel
        CherryPeel last edited by

        主要是想做个语音对话,需要将用户的语音转换为文字。

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

          通过分析文件头可以知道下载文件类型是 silk,你需要找个库将它转换为 wav 或 mp3 等常用格式

          CherryPeel 2 Replies Last reply Reply Quote 0
          • CherryPeel
            CherryPeel @MrXiaoM last edited by

            @MrXiaoM 这个我是知道的,问题就是我不管怎么搞,他都转换不了。9873e961-ab86-4841-977d-7e5ca7534c84-image.png
            我把它当amr文件不行。
            24a8247b-e2ba-4457-b330-a5b98d9906f3-image.png
            1d11fe69-05e9-4fa7-90c8-b4ef56406571-image.png
            (silk编码后缀名我不知道是啥,百度看到了slk和silk,所以都试了下)。

            这也都不行。但是按照github issue区的说法就是换个扩展名就行。还请指点。
            011ba548-0ef0-4fae-ae62-a6bb87207460-image.png
            issue259

            我的测试语音链接

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

              @MrXiaoM ok了,已经用https://github.com/kn007/silk-v3-decoder这个项目解决了,谢谢了

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