4. 代码解读

4.1. 后端接口

class interface.ExtractSubtitleApi[源代码]

识别字幕接口类

detect_recognition_model()[源代码]

加载深度模型

返回

成功或者失败

返回类型

dict

extract_human_voice_from_sound(local_mp3_filepath)[源代码]

提取人声接口

参数

local_mp3_filepath (str) -- 本地的视频原声mp3格式文件

返回

转化成功后的wav文件地址

返回类型

dict

get_human_voice_time_point(remote_wav_filename)[源代码]

根据声音停顿返回有声音的区间段

参数

remote_wav_filename (str) -- 远程的wav格式音频的绝对路径

返回

有声音的区间段列表

返回类型

dict

text_recognition(base64_img)[源代码]

文字识别接口

参数

base64_img (str) -- 转化为base64格式的图片

返回

图片中的坐标:文字

返回类型

dict