Giter Site home page Giter Site logo

tengxun-jianquan's Introduction

腾讯鉴权实现整个流程

例子为语音识别接口的实现:


TXspeek.py为主文件,其中的class AipSpeech继承自test中base.pyAipBase。

AipSpeech实现了“拼接参数”,“生成签名”,"语音识别接口访问"。

实例化 AipSpeech(yourappid,"yourid","yourkey") 需要三个参数,对应你的腾讯云给的。

上传成功后,会返回响应信息,并且,识别成功后,会把识别后的内容回调给回调地址写的接口中。


使用方法:

填充参数即可:

 回调地址 (接受响应的外网地址)
call_url = "http://ksp2tc.natappfree.cc/test"
 实例化类,填写腾讯云提供的参数
speech = AipSpeech("yourappid","yourid","yourkey")
 生成参数列表
sortkeydict = speech.sortparms(call_url)
 生成签名
signature_str = speech.keygen(sortkeydict)
 调用语音识别方法
 speech.request2getjob_id(signature_str, speech._appID, r"F:\08.mp3", sortkeydict) # 填写本地语音地址'

tengxun-jianquan's People

Contributors

1414044032 avatar

Stargazers

 avatar  avatar Dave avatar innocent0330 avatar  avatar dystargate avatar Forest Cai avatar  avatar  avatar FiveMaster avatar  avatar  avatar

Watchers

James Cloos avatar AlexWang avatar

tengxun-jianquan's Issues

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.