Web Analytics

ThinkSound

⭐ 1043 stars Thai by FunAudioLLM

ThinkSound

🌐 English | 简体中文 | 繁體中文 | Español | Français | 日本語

NeurIPS 2025

arXiv   Online Demo   Hugging Face   ModelScope

หากคุณพบว่าโปรเจ็กต์นี้มีประโยชน์,
การให้ดาว ⭐ บน GitHub จะได้รับการชื่นชมเป็นอย่างยิ่ง!


ThinkSound คือกรอบงานการสร้างเสียง Any2Audio แบบรวมศูนย์ โดยใช้การจับคู่การไหลที่ถูกชี้นำด้วยเหตุผล Chain-of-Thought (CoT)

การใช้งาน PyTorch สำหรับการสร้างและแก้ไขเสียงมัลติโหมด: สร้างหรือแก้ไขเสียงจากวิดีโอ ข้อความ และเสียง โดยขับเคลื่อนด้วยกระบวนการคิดทีละขั้นจากโมเดลภาษาใหญ่หลายโหมด (MLLMs)

Teaser


📰 ข่าวสาร

---

🚀 คุณสมบัติเด่น

---

✨ ภาพรวมวิธีการ

ThinkSound แยกกระบวนการสร้างและแก้ไขเสียงออกเป็น 3 ขั้นตอนโต้ตอบ โดยทั้งหมดขับเคลื่อนด้วยกระบวนการคิดแบบ Chain-of-Thought ด้วย MLLM:

ThinkSound Overview


⚡ เริ่มต้นอย่างรวดเร็ว

การเตรียมสภาพแวดล้อม:

git clone https://github.com/liuhuadai/ThinkSound.git
cd ThinkSound
conda create -n thinksound python=3.10
conda activate thinksound
pip install thinksound
conda install -y -c conda-forge 'ffmpeg<7'

Download pretrained weights https://huggingface.co/liuhuadai/ThinkSound to Directory ckpts/

model weights can be also downloaded from https://www.modelscope.cn/models/iic/ThinkSound

git lfs install git clone https://huggingface.co/liuhuadai/ThinkSound ckpts

To improve inference and training speed, you may optionally install a FlashAttention backend compatible with your system and PyTorch version.

เคล็ดลับสำหรับ Windows:
ผู้ใช้ Windows สามารถรัน setup_windows.bat (หรือดับเบิลคลิกไฟล์นี้) เพื่อสร้างสภาพแวดล้อม conda ติดตั้งทุก dependency (รวมถึง FFmpeg) และดาวน์โหลดโมเดลที่ผ่านการฝึกมาแล้วโดยอัตโนมัติ — ไม่ต้องตั้งค่าด้วยตนเอง
ตรวจสอบให้แน่ใจว่าได้ติดตั้ง conda และ git และทั้งสองอยู่ใน PATH ของระบบก่อนรันสคริปต์นี้

▶️ รันเดโม

#### Linux/macOS

chmod +x scripts/demo.sh
./scripts/demo.sh   <CoT description> [use-half]</code></pre>
#### <strong>Windows</strong></p><p>คุณสามารถใช้สคริปต์ <code>.bat</code> ที่ให้มาแทนได้:</p><pre><code class="language-bash">.\scripts\demo.bat <path-to-your-demo-video> <title> <CoT description> [use-half]</code></pre>
<strong>หมายเหตุ:</strong></p><ul><li><code><path-to-your-demo-video></code>: เส้นทางไปยังวิดีโอตัวอย่างของคุณ</li>
<li><code>[use-half]</code> (ไม่บังคับ): เพิ่ม use-half ต่อท้ายเพื่อเปิดใช้งานการดึงคุณลักษณะแบบ half precision</li></p><p></ul>---</p><h3>📦 การทำนายแบบกลุ่ม</h3></p><p>#### <strong>Linux/macOS</strong></p><pre><code class="language-bash">chmod +x scripts/eval_batch.sh
./scripts/eval_batch.sh <video_path> <csv_path> <save_path (optional)> [use-half]</code></pre>
#### <strong>Windows</strong></p><p>ใช้สคริปต์ <code>.bat</code> ที่เทียบเท่า:</p><pre><code class="language-bash">.\scripts\eval_batch.bat <video_path> <csv_path> <save_path (optional)> [use-half]</code></pre>
<strong>หมายเหตุ:</strong></p><ul><li><code><video_path></code>: เส้นทางไปยังไดเรกทอรีหลักที่มีไฟล์วิดีโอ .mp4 ทั้งหมดที่จะประมวลผล (วิดีโอทั้งหมดต้องมีระยะเวลาเท่ากัน)</li>
<li><code><csv_path></code>: ไฟล์ CSV ที่มีข้อความพรอมต์สำหรับแต่ละวิดีโอ (ดูรูปแบบได้ที่ <code>demo_test.csv</code>)</li>
<li><code><save_path></code> (ไม่บังคับ): ตำแหน่งที่จะบันทึกไฟล์เสียงที่สร้างขึ้น ค่าเริ่มต้นคือ <code>results/features</code></li>
<li><code>[use-half]</code> (ไม่บังคับ): เพิ่ม use-half ต่อท้ายเพื่อเปิดใช้งานการสกัดคุณลักษณะด้วยความแม่นยำครึ่งหนึ่ง</li></p><p></ul>---</p><h3>การใช้งานผ่านเว็บอินเทอร์เฟซ</h3></p><p>สำหรับประสบการณ์แบบโต้ตอบ ให้เปิดใช้งาน Gradio web interface:</p><pre><code class="language-bash">python app.py</code></pre></p><h2>🏋️ ฝึกอบรมโมเดล</h2></p><p>ดู <a href="https://raw.githubusercontent.com/FunAudioLLM/ThinkSound/master/docs/Training.md" target="_blank" rel="noopener noreferrer"><code>Training.md</code></a></p><hr></p><h2>📝 TODO & แผนในอนาคต</h2>
<ul><li>- [ ] ปล่อยโมเดลพื้นฐานที่ทรงพลังมากขึ้น ครอบคลุมหลายโดเมน เพื่อสร้างประสบการณ์การสร้างเสียงโฟลีย์ที่น่าสนใจและสมจริงยิ่งขึ้น</li>
<li>- [ ] เพิ่มการรองรับรูปแบบข้อมูลและงานปลายทางเพิ่มเติม</li>
<li>- [ ] ปล่อยโมเดลในขนาดที่แตกต่างกัน</li>
<li>- [x] เปิดซอร์สชุดข้อมูล AudioCoT และระบบอัตโนมัติ</li>
<li>- [x] ปล่อยสคริปต์สำหรับฝึกอบรมโมเดล ThinkSound</li>
<li>- [x] README สำหรับเริ่มต้นใช้งาน Windows ที่เหมาะสำหรับมือใหม่</li>
</ul>---</p><h2>📄 ใบอนุญาต</h2></p><p>โปรเจกต์นี้เผยแพร่ภายใต้ใบอนุญาต Apache 2.0</p><blockquote><strong>หมายเหตุ:</strong></blockquote>
<blockquote>โค้ด โมเดล และชุดข้อมูลนี้มีไว้สำหรับ <strong>การวิจัยและการศึกษาเท่านั้น</strong></blockquote>
<blockquote><strong>ไม่อนุญาตให้ใช้เชิงพาณิชย์</strong></blockquote>
<blockquote>หากต้องการใช้เชิงพาณิชย์ กรุณาติดต่อผู้เขียน</blockquote></p><p><strong>📦 ส่วนประกอบจากบุคคลที่สาม</strong></p><ul><li><strong>Stable Audio Open VAE</strong> (โดย Stability AI):</li>
  </ul>ที่เก็บนี้รวม VAE ที่ปรับแต่งจาก <a href="https://huggingface.co/stabilityai/stable-audio-open-1.0/" target="_blank" rel="noopener noreferrer">Stable Audio Open</a> ซึ่งได้รับอนุญาตภายใต้ <a href="https://raw.githubusercontent.com/FunAudioLLM/ThinkSound/master/./third_party/LICENSE_StabilityAI.md" target="_blank" rel="noopener noreferrer">Stability AI Community License</a>
  <strong>การใช้และแจกจ่ายเชิงพาณิชย์ต้องได้รับอนุญาตล่วงหน้าจาก Stability AI</strong></p><ul><li>📘 <strong>โค้ดและโมเดลอื่น ๆ ทั้งหมด</strong> เผยแพร่ภายใต้ใบอนุญาต Apache 2.0</li></p><p></ul>---</p><h2>คำขอบคุณ</h2></p><p>ขอขอบคุณเป็นอย่างสูงแก่:</p><ul><li><strong>stable-audio-tools</strong> (โดย Stability AI):</li>
</ul>สำหรับการจัดเตรียมเฟรมเวิร์กที่ใช้งานง่ายสำหรับการสร้างเสียง รวมถึงโมดูล VAE และน้ำหนักโมเดล
<ul><li><strong>MMAudio</strong>:</li>
  </ul>สำหรับการนำโครงสร้างหลัก MM-DiT มาใช้ในโดเมนเสียง</p><hr></p><h2>📖 การอ้างอิง</h2></p><p>หากคุณพบว่า ThinkSound มีประโยชน์ในการวิจัยหรือการทำงานของคุณ โปรดอ้างอิงงานวิจัยของเรา:</p><pre><code class="language-bibtex">@misc{liu2025thinksoundchainofthoughtreasoningmultimodal,
      title={ThinkSound: Chain-of-Thought Reasoning in Multimodal Large Language Models for Audio Generation and Editing}, 
      author={Huadai Liu and Jialei Wang and Kaicheng Luo and Wen Wang and Qian Chen and Zhou Zhao and Wei Xue},
      year={2025},
      eprint={2506.21448},
      archivePrefix={arXiv},
      primaryClass={eess.AS},
      url={https://arxiv.org/abs/2506.21448}, 
}</code></pre></p><hr></p><h2>📬 Contact</h2></p><p>
✨ Feel free to <a href="https://github.com/liuhuadai/ThinkSound/issues" target="_blank" rel="noopener noreferrer">open an issue</a> or contact us via email (<a href="https://raw.githubusercontent.com/FunAudioLLM/ThinkSound/master/mailto:liuhuadai@zju.edu.cn" target="_blank" rel="noopener noreferrer">liuhuadai@zju.edu.cn</a>) if you have any questions or suggestions!</p><p>


---


Tranlated By <a href="https://github.com/OpenAiTx/OpenAiTx" target="_blank" rel="noopener noreferrer">Open Ai Tx</a> | Last indexed: 2025-10-04


---</p>
        </div>
        
        <div class="original-link">
            <strong>Original README:</strong> <a href="https://raw.githubusercontent.com/FunAudioLLM/ThinkSound/master/README.md" target="_blank" rel="noopener noreferrer">View on GitHub</a>
        </div>
    </div>
    
    <div class="footer">
        <p>Translated by <a href="https://github.com/OpenAiTx/OpenAiTx" target="_blank" rel="noopener noreferrer">OpenAiTx</a> | 
        Last updated: 2025-10-04 
    </div>
    
</body>
</html>