用于deepfects api的python绑定
deepaffects的Python项目详细描述
深度影响python
用于deepfects api的python客户端库
要求。
python 2.7和3.3+
pymediainfo>;=2.1.9,这是一个围绕mediainfo的包装库,我们使用它 从音频文件中提取采样率和编解码器信息。
安装
pip安装
python包可以直接从pip安装,使用:
pip install deepaffects
从github安装pip
python包托管在github上,您可以直接从github安装
pip install git+https://github.com/SEERNET/deepaffects-python.git
(您可能需要使用根权限运行pip
:sudo pip install git+https://github.com/SEERNET/deepaffects-python.git
)
然后导入包:
importdeepaffects
设置工具
通过Setuptools安装。
python setup.py install --user
(或sudo python setup.py install
为所有用户安装软件包)
然后导入包:
importdeepaffects
授权文件
deepfects api通过api密钥对所有api请求进行身份验证。
对于api密钥注册和设置,请查看我们的quickstart guide
用户安全
- 类型:api键
- api键参数名:api key
- 位置:url查询字符串
开始
请按照installation指令执行以下python代码:
from__future__importprint_functionimporttimeimportdeepaffectsfromdeepaffects.restimportApiExceptionfrompprintimportpprint# Configure API key authorization: UserSecuritydeepaffects.configuration.api_key['apikey']='YOUR_API_KEY'# create an instance of the API classapi_instance=deepaffects.DenoiseApi()body=deepaffects.Audio.from_file('/path/to/file')# Audio | Audio object that needs to be denoised.webhook='webhook_example'# str | The webhook url where result from async resource is postedrequest_id='request_id_example'# str | Unique identifier for the request (optional)try:# Denoise an audio fileapi_response=api_instance.async_denoise_audio(body,webhook,request_id=request_id)pprint(api_response)exceptApiExceptionase:print("Exception when calling DenoiseApi->async_denoise_audio: %s\n"%e)
API端点文档
所有uri都与https://localhost
Class | Method | HTTP request | Description |
---|---|---|---|
DenoiseApi | async_denoise_audio | POST /api/v1/async/denoise | Denoise an audio file |
DenoiseApi | sync_denoise_audio | POST /api/v1/sync/denoise | Denoise an audio file |
DiarizeApiV2 | async_diarize_audio | POST /api/v2/async/diarize | Diarize an audio file |
DiarizeApi | async_diarize_audio | POST /api/v1/async/diarize | Diarize an audio file (Legacy) |
DiarizeApi | sync_diarize_audio | POST /api/v1/sync/diarize | Diarize an audio file (Legacy) |
EmotionApi | async_recognise_emotion | POST /api/v1/async/recognise_emotion | Find emotion in an audio file |
EmotionApi | sync_recognise_emotion | POST /api/v1/sync/recognise_emotion | Find emotion in an audio file |
FeaturizeApi | async_featurize_audio | POST /api/v1/async/featurize | featurize an audio file |
FeaturizeApi | sync_featurize_audio | POST /api/v1/sync/featurize | featurize an audio file |
型号文档
用户安全性
- 类型:api键
- api键参数名:api key
- 位置:url查询字符串
关于
DeepAffects是一个情绪智力分析引擎,用于测量情绪智力的效果 具有团队动态,并提供情感分析,作为改进洞察力的基础 跨组织、项目和团队的项目管理、绩效和满意度。查看deepfects的运行:查看deepfectsAtlassian JIRA addon和我们的Github addon。