Giter Site home page Giter Site logo

bdfy's Introduction

百度翻译 逆js 得sign,gettts获取语音

通过逆向js访问百度翻译v2transapi获取翻译值,并且请求gettts获取audio文件

trasnlate.py

运行translate.py,会自动调用当前文件夹下的bdfy_sign.js,此js是将输入要查询的字符串转换为sign码。 因为有main函数接口所以会自动运行,命令行中输入任意字符串即可获取相对于的英文/中文,并自动在user_log.txt中生成部分记录。

TextToAudio.py

运行TextToAudio.py,也会自动运行,调用translate.py程序并获取相关信息。 向百度翻译的/gettts发送相关请求,接受二进制音频文件,并保存在 $File_Dir$/Audio/en 和 $File_Dir$/Audio/zh 下。 en中保存英语语音,zh中保存中文语音,若不存在Audio文件夹,程序会自动创建。

承诺:

整个代码中不含任何恶意代码及收集信息和发送任何隐私数据。

请悉知:

下载后各位大神可以简化代码,自己改编、改写,对改写后的任何代码我不负任何责任。

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.