Commit f882cc6d authored by 翟艳秋(20软)'s avatar 翟艳秋(20软)

chore: 修改了部分docstring以及README.md

parent a62be560
### 文件结构
1、界面文件——try_with_gui.py
1、界面文件——main_gui.py
2、各功能模块:
......@@ -11,8 +11,17 @@
- speech_synthesis.py:生成旁白语音
- split_wav.py:对视频中的音频进行提取、切分等操作
- PaddlePaddle_DeepSpeech2文件夹:使用PaddleSpeech获取音频对应文本
- infer_path.py:基于ASR的长音频识别
- ./utils/audio_vad.py:使用VAD将长音频分割为n段较短的音频
3、文档
- 存放在docs文件夹中。
- **内容**:主要是上述界面文件和功能模块中相关函数的功能和使用方法的介绍。
4、配置文件
* speakers.json:各个说话人的相关配置信息
* ./speaker_audio:存放各个说话人的样例音频
* main_gui.spec:使用pyinstaller进行打包时的配置文件,具体的打包方法见“打包方法.md”文件。
* eagle_2.ico:应用图标
......@@ -74,7 +74,7 @@ def detect_with_asr(video_path: str, book_path: str, start_time=0, end_time=-1,
book_path (str): 旁白表格输出地址
start_time (int, optional): 视频实际开始时间. Defaults to 0.
end_time (int, optional): 视频实际结束时间. Defaults to -1.
state (_type_, optional): 用于通信的状态关键字. Defaults to None.
state (optional): 用于通信的状态关键字. Defaults to None.
"""
if state is None:
state = [None]
......
......@@ -147,7 +147,7 @@
<span class="sd"> book_path (str): 旁白表格输出地址</span>
<span class="sd"> start_time (int, optional): 视频实际开始时间. Defaults to 0.</span>
<span class="sd"> end_time (int, optional): 视频实际结束时间. Defaults to -1.</span>
<span class="sd"> state (_type_, optional): 用于通信的状态关键字. Defaults to None.</span>
<span class="sd"> state (optional): 用于通信的状态关键字. Defaults to None.</span>
<span class="sd"> &quot;&quot;&quot;</span>
<span class="k">if</span> <span class="n">state</span> <span class="ow">is</span> <span class="kc">None</span><span class="p">:</span>
<span class="n">state</span> <span class="o">=</span> <span class="p">[</span><span class="kc">None</span><span class="p">]</span>
......
......@@ -184,7 +184,8 @@
<div class="viewcode-block" id="create_detail_day"><a class="viewcode-back" href="../main_gui.html#main_gui.create_detail_day">[文档]</a><span class="k">def</span> <span class="nf">create_detail_day</span><span class="p">()</span> <span class="o">-&gt;</span> <span class="nb">str</span><span class="p">:</span>
<span class="sd">&quot;&quot;&quot;生成当天日期</span>
<span class="sd"> :return: [str], 当天日期</span>
<span class="sd"> Returns:</span>
<span class="sd"> str: 当天日期</span>
<span class="sd"> &quot;&quot;&quot;</span>
<span class="n">daytime</span> <span class="o">=</span> <span class="n">datetime</span><span class="o">.</span><span class="n">datetime</span><span class="o">.</span><span class="n">now</span><span class="p">()</span><span class="o">.</span><span class="n">strftime</span><span class="p">(</span><span class="s1">&#39;day&#39;</span> <span class="o">+</span> <span class="s1">&#39;%Y_%m_</span><span class="si">%d</span><span class="s1">&#39;</span><span class="p">)</span>
<span class="k">return</span> <span class="n">daytime</span></div>
......
......@@ -76,6 +76,11 @@
<span class="sd">主要是根据视频有无字幕,在基于OCR的方法和基于ASR的方法中进行选择调用。</span>
<span class="sd">(视频有无字幕的信息可以通过人机交互界面传入,也可以通过调用detect_movie函数检测得到)</span>
<span class="sd">.. code-block:: python</span>
<span class="sd"> from narratage_detection import detect</span>
<span class="sd"> detect(video_path, start_time, end_time, book_path, state, subtitle)</span>
<span class="sd">&quot;&quot;&quot;</span>
<span class="kn">import</span> <span class="nn">os.path</span>
<span class="kn">import</span> <span class="nn">argparse</span>
......
......@@ -79,7 +79,7 @@
<span class="sd"> - 将字幕导出为字幕文件;</span>
<span class="sd"> - 调用azure提供的TTS接口(说话人由用户选择),合成旁白音频,存放到用户选择的文件夹中;</span>
<span class="sd"> - 根据旁白的时间戳及文本、语速等信息,对应调整原视频中音频的音量。</span>
<span class="sd"> - 将合成的旁白融合到原视频的音频中,并输出到用户选择的文件夹下。</span>
<span class="sd"> - 将合成的旁白融合到原视频的音频中,并输出到用户选择的文件夹下。(暂时放弃)</span>
<span class="sd">外部调用方式:</span>
......
......@@ -71,8 +71,15 @@
<div itemprop="articleBody">
<h1>split_wav 源代码</h1><div class="highlight"><pre>
<span></span><span class="c1"># 最简单的是音轨分离,直接将背景音乐的轨道剥离,只剩下人声道后即可根据空白片段进行切割</span>
<span></span><span class="sd">&quot;&quot;&quot;音频的一些前处理(目前仅提供音频提取功能)</span>
<span class="sd">主要包含以下内容:</span>
<span class="sd"> - 从视频中读取音频</span>
<span class="sd"> - 将音频划分为n个文件,并存储到本地</span>
<span class="sd"> - 从音频中提取人声</span>
<span class="sd"> - 从音频中提取背景音乐</span>
<span class="sd">&quot;&quot;&quot;</span>
<span class="c1"># 最简单的是音轨分离,直接将背景音乐的轨道剥离,只剩下人声道后即可根据空白片段进行切割</span>
<span class="c1"># 只有一个音轨时,使用音乐检索系统,分割人声和背景音乐声</span>
<span class="kn">import</span> <span class="nn">os</span>
......
......@@ -26,3 +26,9 @@ Welcome to accessibility movie's documentation!
split_wav
Indices and tables
==================
* :ref:`genindex`
* :ref:`modindex`
* :ref:`search`
\ No newline at end of file
......@@ -116,7 +116,7 @@
<li><p><strong>book_path</strong> (<em>str</em>) – 旁白表格输出地址</p></li>
<li><p><strong>start_time</strong> (<em>int</em><em>, </em><em>optional</em>) – 视频实际开始时间. Defaults to 0.</p></li>
<li><p><strong>end_time</strong> (<em>int</em><em>, </em><em>optional</em>) – 视频实际结束时间. Defaults to -1.</p></li>
<li><p><strong>state</strong> (<em>_type_</em><em>, </em><em>optional</em>) – 用于通信的状态关键字. Defaults to None.</p></li>
<li><p><strong>state</strong> (<em>optional</em>) – 用于通信的状态关键字. Defaults to None.</p></li>
</ul>
</dd>
</dl>
......
......@@ -88,6 +88,14 @@
<li class="toctree-l1"><a class="reference internal" href="split_wav.html">split_wav</a></li>
</ul>
</div>
</section>
<section id="indices-and-tables">
<h1>Indices and tables<a class="headerlink" href="#indices-and-tables" title="永久链接至标题"></a></h1>
<ul class="simple">
<li><p><a class="reference internal" href="genindex.html"><span class="std std-ref">索引</span></a></p></li>
<li><p><a class="reference internal" href="py-modindex.html"><span class="std std-ref">模块索引</span></a></p></li>
<li><p><a class="reference internal" href="search.html"><span class="std std-ref">搜索页面</span></a></p></li>
</ul>
</section>
......
......@@ -196,7 +196,10 @@
<dd><p>生成当天日期</p>
<dl class="field-list simple">
<dt class="field-odd">返回</dt>
<dd class="field-odd"><p>[str], 当天日期</p>
<dd class="field-odd"><p>当天日期</p>
</dd>
<dt class="field-even">返回类型</dt>
<dd class="field-even"><p>str</p>
</dd>
</dl>
</dd></dl>
......
......@@ -78,6 +78,10 @@
<p>检测视频中的字幕及旁白区间</p>
<p>主要是根据视频有无字幕,在基于OCR的方法和基于ASR的方法中进行选择调用。
(视频有无字幕的信息可以通过人机交互界面传入,也可以通过调用detect_movie函数检测得到)</p>
<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="kn">from</span> <span class="nn">narratage_detection</span> <span class="kn">import</span> <span class="n">detect</span>
<span class="n">detect</span><span class="p">(</span><span class="n">video_path</span><span class="p">,</span> <span class="n">start_time</span><span class="p">,</span> <span class="n">end_time</span><span class="p">,</span> <span class="n">book_path</span><span class="p">,</span> <span class="n">state</span><span class="p">,</span> <span class="n">subtitle</span><span class="p">)</span>
</pre></div>
</div>
<dl class="py function">
<dt class="sig sig-object py" id="narratage_detection.detect">
<span class="sig-prename descclassname"><span class="pre">narratage_detection.</span></span><span class="sig-name descname"><span class="pre">detect</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">video_path</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">str</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">start_time</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">float</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">end_time</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">float</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">book_path</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">str</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">state</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">subtitle</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">int</span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">0</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/narratage_detection.html#detect"><span class="viewcode-link"><span class="pre">[源代码]</span></span></a><a class="headerlink" href="#narratage_detection.detect" title="永久链接至目标"></a></dt>
......
Search.setIndex({docnames:["detect_with_asr","detect_with_ocr","index","judge_subtitle","main_gui","modules","narratage_detection","speech_synthesis","split_wav"],envversion:{"sphinx.domains.c":2,"sphinx.domains.changeset":1,"sphinx.domains.citation":1,"sphinx.domains.cpp":4,"sphinx.domains.index":1,"sphinx.domains.javascript":2,"sphinx.domains.math":2,"sphinx.domains.python":3,"sphinx.domains.rst":2,"sphinx.domains.std":2,"sphinx.ext.intersphinx":1,"sphinx.ext.todo":2,"sphinx.ext.viewcode":1,sphinx:56},filenames:["detect_with_asr.rst","detect_with_ocr.rst","index.rst","judge_subtitle.rst","main_gui.rst","modules.rst","narratage_detection.rst","speech_synthesis.rst","split_wav.rst"],objects:{"":[[0,0,0,"-","detect_with_asr"],[1,0,0,"-","detect_with_ocr"],[3,0,0,"-","judge_subtitle"],[4,0,0,"-","main_gui"],[6,0,0,"-","narratage_detection"],[7,0,0,"-","speech_synthesis"],[8,0,0,"-","split_wav"]],"main_gui.RunThread":[[4,3,1,"","run"]],detect_with_asr:[[0,1,1,"","create_sheet"],[0,1,1,"","detect_with_asr"],[0,1,1,"","write_to_sheet"]],detect_with_ocr:[[1,1,1,"","detect_subtitle"],[1,1,1,"","detect_with_ocr"],[1,1,1,"","erasePunc"],[1,1,1,"","get_position"],[1,1,1,"","normalize"],[1,1,1,"","process_video"],[1,1,1,"","string_similar"]],judge_subtitle:[[3,1,1,"","detect_movie"],[3,1,1,"","detect_subtitle"],[3,1,1,"","random_int_list"]],main_gui:[[4,2,1,"","RunThread"],[4,1,1,"","all_speaker_info"],[4,1,1,"","check_sheet_content"],[4,1,1,"","check_timePoint"],[4,1,1,"","choose_speaker_by_name"],[4,1,1,"","confirm_video_path"],[4,1,1,"","create_detail_day"],[4,1,1,"","find_save_dir"],[4,1,1,"","find_save_file"],[4,1,1,"","get_sheetHead"],[4,1,1,"","make_print_to_file"],[4,1,1,"","on_closing"],[4,1,1,"","open_sheet_file"],[4,1,1,"","open_video_file"],[4,1,1,"","play_audio"],[4,1,1,"","set_caption_file"],[4,1,1,"","start_detect"],[4,1,1,"","start_process"],[4,1,1,"","start_synthesis"],[4,1,1,"","stop_detect"],[4,1,1,"","stop_synthesis"],[4,1,1,"","thread_it"],[4,1,1,"","trans_to_seconds"]],narratage_detection:[[6,1,1,"","detect"]],speech_synthesis:[[7,2,1,"","Speaker"],[7,1,1,"","adjust_volume"],[7,1,1,"","change_speed_and_volume"],[7,1,1,"","choose_speaker"],[7,1,1,"","export_caption"],[7,1,1,"","get_narratage_text"],[7,1,1,"","init_speakers"],[7,1,1,"","mix_speech"],[7,1,1,"","read_sheet"],[7,1,1,"","second_to_str"],[7,1,1,"","speech_synthesis"],[7,1,1,"","ss_and_export"]],split_wav:[[8,1,1,"","extract_audio"]]},objnames:{"0":["py","module","Python \u6a21\u5757"],"1":["py","function","Python \u51fd\u6570"],"2":["py","class","Python \u7c7b"],"3":["py","method","Python \u65b9\u6cd5"]},objtypes:{"0":"py:module","1":"py:function","2":"py:class","3":"py:method"},terms:{"1%":4,"1.0":7,"100":4,"\u4e00\u4e2a":[1,4],"\u4e00\u4e9b":1,"\u4e00\u5e27":3,"\u4e00\u671f":4,"\u4e00\u6bb5":3,"\u4e09\u79cd":6,"\u4e0a\u4e0b":1,"\u4e0a\u4f20":4,"\u4e0d\u80fd":4,"\u4e24\u4e2a":[3,4],"\u4e2a\u6570":3,"\u4e2d\u5f85":7,"\u4e2d\u6587":1,"\u4e2d\u65ad":[3,4],"\u4e2d\u6709":3,"\u4e34\u65f6":[0,8],"\u4e34\u65f6\u6587\u4ef6":8,"\u4e3a\u5217":7,"\u4e3b\u7ebf":4,"\u4e3b\u8981":[1,6],"\u4e86\u89e3":4,"\u4e8b\u4ef6":4,"\u4e8c\u4e2a":1,"\u4ea4\u4e92":[4,6],"\u4eba\u5219":7,"\u4eba\u673a":[4,6],"\u4eba\u673a\u4ea4\u4e92":[4,6],"\u4ec5\u9650":4,"\u4ee3\u7801":[0,1,3,4,6,7,8],"\u4ee3\u8868":4,"\u4ee5\u4e0b":4,"\u4ee5\u4e0b\u5185\u5bb9":4,"\u4ee5\u4fbf":1,"\u4ee5\u53ca":[0,1,7],"\u4ef6\u5939":[0,4,7,8],"\u4efb\u52a1":[1,4,6],"\u4f20\u5165":[4,6,7],"\u4f4d\u7f6e":[0,1,4,6,7],"\u4f5c\u4e3a":4,"\u4f7f\u7528":[0,1,3,4],"\u4fdd\u5b58":[4,7],"\u4fe1\u606f":[0,1,4,6,7],"\u4fee\u6539":7,"\u505c\u6b62":4,"\u5173\u952e":[0,1],"\u5173\u952e\u5b57":[0,1],"\u5173\u95ed":4,"\u5185\u53d6":3,"\u5185\u5bb9":[0,4,7],"\u5199\u5165":0,"\u51cf\u5c11":1,"\u51fd\u6570":[4,6],"\u5206\u4e3a":4,"\u5206\u5272":0,"\u5206\u6790":1,"\u5217\u8868":7,"\u521b\u5efa":4,"\u521d\u59cb":[0,7],"\u521d\u59cb\u5316":[0,7],"\u5224\u65ad":[0,1,3],"\u524d\u8fdb":4,"\u5305\u542b":[4,7],"\u533a\u95f4":[0,1,3,4,6],"\u5355\u4f4d":3,"\u5373\u53ef":0,"\u53bb\u9664":1,"\u53c2\u6570":[0,1,3,4,6,7,8],"\u53d1\u73b0":4,"\u53d6\u5e27":3,"\u53d8\u91cf":4,"\u53ef\u4ee5":6,"\u53ef\u80fd":[1,4],"\u5404\u79cd":4,"\u5408\u6210":[4,7],"\u5408\u7406":4,"\u5408\u7406\u6027":4,"\u540c\u65f6":0,"\u540d\u5b57":[0,4,7],"\u540e\u7eed":1,"\u5426\u5219":4,"\u542f\u52a8":4,"\u56fa\u5b9a":7,"\u5730\u5740":[0,1,3,4,7],"\u57fa\u4e8e":[0,1,6],"\u57fa\u7c7b":[4,7],"\u58f0\u97f3":7,"\u5904\u7406":[0,1],"\u590d\u5199":4,"\u5916\u90e8":[0,1,3,7],"\u591a\u6570":3,"\u591a\u7ebf":4,"\u591a\u7ebf\u7a0b":4,"\u5927\u503c":3,"\u5927\u6982":1,"\u592a\u5c0f":7,"\u5982\u4e0b":[0,1,7],"\u5982\u679c":[3,4,7],"\u59d3\u540d":[4,7],"\u5b57\u5e55":[0,1,3,4,6,7],"\u5b57\u6570":[0,1],"\u5b57\u7b26":[1,4,7],"\u5b57\u7b26\u4e32":[1,4,7],"\u5b58\u50a8":[0,1,4,6,7,8],"\u5b58\u5728":0,"\u5b58\u653e":[4,6,7],"\u5b88\u62a4":4,"\u5b8c\u6210":1,"\u5b9e\u65f6":4,"\u5b9e\u9645":[0,1,4,8],"\u5bf9\u5e94":[0,4,7],"\u5bf9\u9f50":4,"\u5bfc\u5165":4,"\u5bfc\u51fa":[4,7],"\u5c5e\u6027":7,"\u5de5\u7a0b":4,"\u5e74\u9f84":[4,7],"\u5e74\u9f84\u6bb5":[4,7],"\u5efa\u8bae":[0,7],"\u5f00\u59cb":[0,1,3,4,6,7,8],"\u5f02\u5e38":4,"\u5f15\u53d1":4,"\u5f39\u7a97":4,"\u5f53\u524d":[1,4],"\u5f53\u5929":4,"\u5f71\u7247":3,"\u5f85\u5904\u7406":[0,1],"\u5f97\u51fa":1,"\u5f97\u5230":[1,6],"\u6027\u522b":[4,7],"\u603b\u4f53":[0,1,7],"\u60c5\u51b5":[4,6],"\u60f3\u8981":7,"\u6240\u6709":[4,7],"\u6240\u9700":4,"\u6253\u5f00":4,"\u6267\u884c":4,"\u627e\u5230":4,"\u62a5\u9519":[4,7],"\u6307\u5b9a":7,"\u6309\u94ae":4,"\u6355\u6349":[1,4],"\u63a5\u53e3":7,"\u63a8\u8350":[0,1,4],"\u63cf\u8ff0":7,"\u63d0\u4f9b":[3,7],"\u63d0\u53d6":[0,8],"\u63d0\u793a":4,"\u63d2\u5165":[0,1,7],"\u64ad\u653e":4,"\u6570\u636e":[0,7],"\u6570\u7ec4":3,"\u6574\u4e2a":1,"\u6574\u90e8":3,"\u6587\u4ef6":[0,1,4,7,8],"\u6587\u4ef6\u5939":[0,4,7,8],"\u6587\u672c":[1,4,7],"\u6587\u672c\u6846":4,"\u65b9\u4fbf":4,"\u65b9\u5f0f":[0,1,3,7],"\u65b9\u6cd5":6,"\u65c1\u767d":[0,1,4,6,7],"\u65e0\u5b57\u5e55":6,"\u65e0\u6cd5":4,"\u65e5\u671f":4,"\u65f6\u6587":8,"\u65f6\u95f4":[0,1,3,4,6,7,8],"\u65f6\u95f4\u5dee":[0,1],"\u662f\u5426":[3,4,6],"\u663e\u793a":4,"\u66f4\u65b0":4,"\u6700\u540e":3,"\u6700\u5927":3,"\u6700\u5927\u503c":3,"\u6700\u5c0f":3,"\u6700\u5c0f\u503c":3,"\u6700\u7ec8":3,"\u672a\u77e5":6,"\u672c\u5730":0,"\u673a\u6570":3,"\u6807\u70b9":1,"\u6807\u70b9\u7b26\u53f7":1,"\u6807\u7b7e":4,"\u680f\u4e2d":4,"\u6821\u5bf9":7,"\u6821\u6b63":7,"\u6837\u4f8b":[4,7],"\u6839\u636e":[0,1,4,6,7],"\u683c\u5f0f":[4,7],"\u6846\u5b9a":1,"\u68c0\u67e5":4,"\u68c0\u6d4b":[0,1,3,4,6],"\u6b63\u5e38":4,"\u6b63\u786e":4,"\u6b65\u9aa4":4,"\u6bcf\u4e2a":3,"\u6bcf\u6bb5":3,"\u6bcf\u79d2":1,"\u6bd4\u8f83":1,"\u6ca1\u6709":[1,3,4,7],"\u6d41\u7a0b":[0,1,7],"\u6d4b\u8bd5":3,"\u6df7\u5408":7,"\u6e90\u4ee3\u7801":[0,1,3,4,6,7,8],"\u7136\u540e":[3,4],"\u7247\u6bb5":3,"\u72b6\u6001":[0,1,4,6,7],"\u7406\u6027":4,"\u751f\u6210":[4,7],"\u7528\u4e8e":[0,1,4,7],"\u7528\u6237":[4,7],"\u7535\u5f71":1,"\u753b\u9762":[1,3],"\u754c\u9762":[4,6,7],"\u767e\u5206":4,"\u767e\u5206\u6bd4":4,"\u76d1\u6d4b":4,"\u76f4\u63a5":3,"\u76f8\u4f3c":1,"\u76f8\u5173":[4,7],"\u786e\u5b9a":[1,3],"\u786e\u8ba4":4,"\u79d2\u6570":[4,7],"\u7a97\u53e3":4,"\u7b26\u53f7":1,"\u7b26\u5408":4,"\u7b2c\u4e00":[1,7],"\u7b2c\u4e00\u4e2a":1,"\u7b2c\u4e8c":1,"\u7b2c\u4e8c\u4e2a":1,"\u7b49\u5f85":4,"\u7b97\u6cd5":[0,1],"\u7c7b\u578b":[1,3,4,7,8],"\u7ebf\u7a0b":4,"\u7ec4\u4ef6":4,"\u7ec8\u6b62":[0,4,7],"\u7ed1\u5b9a":4,"\u7ed3\u675f":[0,1,3,4,6,7,8],"\u7ed3\u679c":3,"\u7ed9\u5b9a":0,"\u7f16\u7801":7,"\u804c\u8868\u5916":1,"\u80fd\u5426":[0,1],"\u811a\u672c":[0,4,7],"\u8303\u5316":1,"\u8303\u56f4":1,"\u83b7\u53d6":[0,1,4,7],"\u878d\u5408":7,"\u884c\u4e3a":7,"\u8868\u5185":0,"\u8868\u540d":1,"\u8868\u5728":7,"\u8868\u5934":[0,4,7],"\u8868\u683c":[0,1,4,6,7],"\u89c4\u8303":1,"\u89c4\u8303\u5316":1,"\u89c6\u9891":[0,1,3,4,6,7,8],"\u89c6\u9891\u6587\u4ef6":4,"\u89e3\u51b3":4,"\u89e3\u8bf4":[0,4,7],"\u89e6\u53d1":4,"\u8ba4\u4e3a":3,"\u8bb0\u5f55":4,"\u8bb2\u89e3":7,"\u8bbe\u7f6e":4,"\u8bc6\u522b":[0,1],"\u8be2\u95ee":4,"\u8bed\u8a00":7,"\u8bed\u901f":[4,7],"\u8bed\u97f3":[4,7],"\u8bf4\u8bdd":[4,7],"\u8bfb\u51fa":7,"\u8bfb\u53d6":[7,8],"\u8bfb\u8868":7,"\u8c03\u5927":7,"\u8c03\u6574":7,"\u8c03\u7528":[0,1,3,4,6,7],"\u8d77\u59cb":[0,7],"\u8d77\u6b62":7,"\u8def\u5f84":[1,4,7,8],"\u8f6c\u6362":[4,7],"\u8f93\u5165":4,"\u8f93\u51fa":[0,1,4,7],"\u8fb9\u754c":1,"\u8fc7\u7a0b":4,"\u8fd0\u884c":4,"\u8fd4\u56de":[1,3,4,7,8],"\u8fd9\u4e2a":7,"\u8fdb\u5ea6":[4,7],"\u8fdb\u5ea6\u6761":[4,7],"\u8fdb\u884c":[1,3,4,6,7],"\u8fde\u7eed":3,"\u9009\u5b9a":4,"\u9009\u62e9":[4,6,7],"\u9009\u9879":4,"\u901a\u4fe1":[0,1,4],"\u901a\u8baf":7,"\u901a\u8fc7":6,"\u914d\u7f6e":7,"\u914d\u7f6e\u6587\u4ef6":7,"\u91cd\u590d":1,"\u9519\u8bef":4,"\u95ee\u9898":4,"\u9664\u6f14":1,"\u968f\u673a":3,"\u968f\u673a\u6570":3,"\u9700\u8981":7,"\u975e\u4e2d\u6587":1,"\u97f3\u91cf":7,"\u97f3\u9891":[0,4,7,8],"\u97f3\u9891\u6587\u4ef6":7,"\u9875\u9762":4,"\u987a\u4fbf":7,"\u9884\u671f":4,"\u9996\u5148":[0,1,4],"\u9ed8\u8ba4":4,"class":[4,7],"default":[0,1,4,6,7],"export":7,"float":[1,3,4,6,7,8],"import":[0,1,3,7],"int":[0,3,4,6,7],"true":[3,4],"with":[2,5],_type_:0,adjust:7,adjust_volum:7,all:4,all_speaker_info:4,and:7,arg:4,asr:[2,5,6],audio:[4,7,8],audio_dir:7,avi:4,azur:7,begin:1,book:[0,1,4,6,7],book_path:[0,1,4,6,7],bool:[3,4],by:4,caption:[4,7],caption_fil:7,caption_path:7,chang:7,change_speed_and_volum:7,check:4,check_sheet_cont:4,check_timepoint:4,choos:[4,7],choose_speak:7,choose_speaker_by_nam:4,close:4,confirm:4,confirm_video_path:4,content:[4,7],creat:[0,4],create_detail_dai:4,create_sheet:0,dai:4,detail:4,detect:[2,3,4,5],detect_movi:[3,6],detect_subtitl:[1,3],detect_with_asr:[2,5],detect_with_ocr:[2,5],dict:[4,7],dir:[4,7],end:[0,1,3,6,7,8],end_tim:[0,1,3,6,8],end_timestamp:7,erasepunc:1,excel:[0,7],export_capt:7,extract:8,extract_audio:8,fals:[3,4],file:[4,7],find:4,find_save_dir:4,find_save_fil:4,frame:3,from:[0,1,3,7],func:4,funcnam:4,get:[1,4,7],get_narratage_text:7,get_posit:1,get_sheethead:4,gui:[2,5],id:7,img:1,info:[4,7],init:7,init_speak:7,interv:[3,4],it:4,json:7,judeg:3,judege_subtitl:3,judg:[2,5],judge_subtitl:[2,5],kei:7,label:4,length:3,list:[0,3,4,7],log:4,main:[2,5],main_gui:[2,5],make:4,make_print_to_fil:4,mix:7,mix_speech:7,mkv:4,mov:4,movi:[3,6],mp4:4,name:[0,1,4,7],narratag:[2,5,7],narratage_detect:[2,5],narratage_path:7,ndarrai:[1,3],none:[0,1,6,7],normal:1,np:[1,3],numpi:[1,3],object:7,ocr:[2,5,6],on:4,on_clos:4,open:4,open_sheet_fil:4,open_video_fil:4,option:[0,1,4,6,7],or:[3,4],origin:7,output:7,output_dir:7,output_fil:7,p_label:4,param:4,path:[0,1,3,4,6,7,8],plai:4,play_audio:4,posit:1,print:4,process:[1,4],process_video:1,progressbar:4,random:3,random_int_list:3,read:7,read_sheet:7,rmvb:4,root:8,run:4,runthread:4,s1:1,s2:1,save:4,second:[4,7],second_to_str:7,set:4,set_caption_fil:4,sheet:[0,1,4,7],sheet_cont:7,sheet_nam:[0,1,7],sheet_path:7,sheethead:4,similar:1,speaker:[4,7],speaker_info:7,speaker_nam:7,speech:[2,5],speech_synthesi:[2,5],speed:7,split:[2,5],split_wav:[2,5],srt:7,ss:7,ss_and_export:7,start:[0,1,3,4,6,7,8],start_detect:4,start_process:4,start_synthesi:4,start_tim:[0,1,3,6,8],start_timestamp:7,state:[0,1,4,6,7],stop:[3,4],stop_detect:4,stop_synthesi:4,str:[0,1,3,4,6,7,8],string:1,string_similar:1,subtitl:[1,2,5,6],synthesi:[2,4,5],tab:4,text:[1,7],thread:4,thread_it:4,time:[0,1,3,6,8],timepoint:4,timestamp:7,tk:4,tkinter:4,to:[0,1,4,6,7],tran:4,trans_to_second:4,ttk:4,tts:7,tupl:[1,7],txt:1,type:[0,4],ui:4,union:1,vad:0,valu:[0,7],valueerror:4,video:[0,1,3,4,6,7,8],video_path:[0,1,3,6,7,8],volum:7,wav:[2,5,7],wav_path:7,write:0,write_to_sheet:0},titles:["detect_with_asr","detect_with_ocr","Welcome to accessibility movie\u2019s documentation!","judge_subtitle","main_gui","accessibility_movie","narratage_detection","speech_synthesis","split_wav"],titleterms:{"with":[0,1],access:[2,5],accessibility_movi:5,api:2,asr:0,detect:[0,1,6],detect_with_asr:0,detect_with_ocr:1,document:2,gui:4,judg:3,judge_subtitl:3,main:4,main_gui:4,movi:[2,5],narratag:6,narratage_detect:6,ocr:1,speech:7,speech_synthesi:7,split:8,split_wav:8,subtitl:3,synthesi:7,to:2,wav:8,welcom:2}})
\ No newline at end of file
Search.setIndex({docnames:["detect_with_asr","detect_with_ocr","index","judge_subtitle","main_gui","modules","narratage_detection","speech_synthesis","split_wav"],envversion:{"sphinx.domains.c":2,"sphinx.domains.changeset":1,"sphinx.domains.citation":1,"sphinx.domains.cpp":4,"sphinx.domains.index":1,"sphinx.domains.javascript":2,"sphinx.domains.math":2,"sphinx.domains.python":3,"sphinx.domains.rst":2,"sphinx.domains.std":2,"sphinx.ext.intersphinx":1,"sphinx.ext.todo":2,"sphinx.ext.viewcode":1,sphinx:56},filenames:["detect_with_asr.rst","detect_with_ocr.rst","index.rst","judge_subtitle.rst","main_gui.rst","modules.rst","narratage_detection.rst","speech_synthesis.rst","split_wav.rst"],objects:{"":[[0,0,0,"-","detect_with_asr"],[1,0,0,"-","detect_with_ocr"],[3,0,0,"-","judge_subtitle"],[4,0,0,"-","main_gui"],[6,0,0,"-","narratage_detection"],[7,0,0,"-","speech_synthesis"],[8,0,0,"-","split_wav"]],"main_gui.RunThread":[[4,3,1,"","run"]],detect_with_asr:[[0,1,1,"","create_sheet"],[0,1,1,"","detect_with_asr"],[0,1,1,"","write_to_sheet"]],detect_with_ocr:[[1,1,1,"","detect_subtitle"],[1,1,1,"","detect_with_ocr"],[1,1,1,"","erasePunc"],[1,1,1,"","get_position"],[1,1,1,"","normalize"],[1,1,1,"","process_video"],[1,1,1,"","string_similar"]],judge_subtitle:[[3,1,1,"","detect_movie"],[3,1,1,"","detect_subtitle"],[3,1,1,"","random_int_list"]],main_gui:[[4,2,1,"","RunThread"],[4,1,1,"","all_speaker_info"],[4,1,1,"","check_sheet_content"],[4,1,1,"","check_timePoint"],[4,1,1,"","choose_speaker_by_name"],[4,1,1,"","confirm_video_path"],[4,1,1,"","create_detail_day"],[4,1,1,"","find_save_dir"],[4,1,1,"","find_save_file"],[4,1,1,"","get_sheetHead"],[4,1,1,"","make_print_to_file"],[4,1,1,"","on_closing"],[4,1,1,"","open_sheet_file"],[4,1,1,"","open_video_file"],[4,1,1,"","play_audio"],[4,1,1,"","set_caption_file"],[4,1,1,"","start_detect"],[4,1,1,"","start_process"],[4,1,1,"","start_synthesis"],[4,1,1,"","stop_detect"],[4,1,1,"","stop_synthesis"],[4,1,1,"","thread_it"],[4,1,1,"","trans_to_seconds"]],narratage_detection:[[6,1,1,"","detect"]],speech_synthesis:[[7,2,1,"","Speaker"],[7,1,1,"","adjust_volume"],[7,1,1,"","change_speed_and_volume"],[7,1,1,"","choose_speaker"],[7,1,1,"","export_caption"],[7,1,1,"","get_narratage_text"],[7,1,1,"","init_speakers"],[7,1,1,"","mix_speech"],[7,1,1,"","read_sheet"],[7,1,1,"","second_to_str"],[7,1,1,"","speech_synthesis"],[7,1,1,"","ss_and_export"]],split_wav:[[8,1,1,"","extract_audio"]]},objnames:{"0":["py","module","Python \u6a21\u5757"],"1":["py","function","Python \u51fd\u6570"],"2":["py","class","Python \u7c7b"],"3":["py","method","Python \u65b9\u6cd5"]},objtypes:{"0":"py:module","1":"py:function","2":"py:class","3":"py:method"},terms:{"1%":4,"1.0":7,"100":4,"\u4e00\u4e2a":[1,4],"\u4e00\u4e9b":[1,8],"\u4e00\u5e27":3,"\u4e00\u671f":4,"\u4e00\u6bb5":3,"\u4e09\u79cd":6,"\u4e0a\u4e0b":1,"\u4e0a\u4f20":4,"\u4e0d\u80fd":4,"\u4e24\u4e2a":[3,4],"\u4e2a\u6570":3,"\u4e2d\u5f85":7,"\u4e2d\u6587":1,"\u4e2d\u65ad":[3,4],"\u4e2d\u6709":3,"\u4e34\u65f6":[0,8],"\u4e34\u65f6\u6587\u4ef6":8,"\u4e3a\u5217":7,"\u4e3b\u7ebf":4,"\u4e3b\u8981":[1,6,8],"\u4e86\u89e3":4,"\u4e8b\u4ef6":4,"\u4e8c\u4e2a":1,"\u4ea4\u4e92":[4,6],"\u4eba\u5219":7,"\u4eba\u58f0":8,"\u4eba\u673a":[4,6],"\u4eba\u673a\u4ea4\u4e92":[4,6],"\u4ec5\u9650":4,"\u4ee3\u7801":[0,1,3,4,6,7,8],"\u4ee3\u8868":4,"\u4ee5\u4e0b":[4,8],"\u4ee5\u4e0b\u5185\u5bb9":[4,8],"\u4ee5\u4fbf":1,"\u4ee5\u53ca":[0,1,7],"\u4ef6\u5939":[0,4,7,8],"\u4efb\u52a1":[1,4,6],"\u4f20\u5165":[4,6,7],"\u4f4d\u7f6e":[0,1,4,6,7],"\u4f5c\u4e3a":4,"\u4f7f\u7528":[0,1,3,4],"\u4fdd\u5b58":[4,7],"\u4fe1\u606f":[0,1,4,6,7],"\u4fee\u6539":7,"\u505c\u6b62":4,"\u5173\u952e":[0,1],"\u5173\u952e\u5b57":[0,1],"\u5173\u95ed":4,"\u5185\u53d6":3,"\u5185\u5bb9":[0,4,7,8],"\u5199\u5165":0,"\u51cf\u5c11":1,"\u51fd\u6570":[4,6],"\u5206\u4e3a":4,"\u5206\u5272":0,"\u5206\u6790":1,"\u5212\u5206":8,"\u5217\u8868":7,"\u521b\u5efa":4,"\u521d\u59cb":[0,7],"\u521d\u59cb\u5316":[0,7],"\u5224\u65ad":[0,1,3],"\u524d\u8fdb":4,"\u529f\u80fd":8,"\u5305\u542b":[4,7,8],"\u533a\u95f4":[0,1,3,4,6],"\u5355\u4f4d":3,"\u5373\u53ef":0,"\u53bb\u9664":1,"\u53c2\u6570":[0,1,3,4,6,7,8],"\u53d1\u73b0":4,"\u53d6\u5e27":3,"\u53d8\u91cf":4,"\u53ef\u4ee5":6,"\u53ef\u80fd":[1,4],"\u5404\u79cd":4,"\u5408\u6210":[4,7],"\u5408\u7406":4,"\u5408\u7406\u6027":4,"\u540c\u65f6":0,"\u540d\u5b57":[0,4,7],"\u540e\u7eed":1,"\u5426\u5219":4,"\u542f\u52a8":4,"\u56fa\u5b9a":7,"\u5730\u5740":[0,1,3,4,7],"\u57fa\u4e8e":[0,1,6],"\u57fa\u7c7b":[4,7],"\u58f0\u97f3":7,"\u5904\u7406":[0,1,8],"\u590d\u5199":4,"\u5916\u90e8":[0,1,3,7],"\u591a\u6570":3,"\u591a\u7ebf":4,"\u591a\u7ebf\u7a0b":4,"\u5927\u503c":3,"\u5927\u6982":1,"\u592a\u5c0f":7,"\u5982\u4e0b":[0,1,7],"\u5982\u679c":[3,4,7],"\u59d3\u540d":[4,7],"\u5b57\u5e55":[0,1,3,4,6,7],"\u5b57\u6570":[0,1],"\u5b57\u7b26":[1,4,7],"\u5b57\u7b26\u4e32":[1,4,7],"\u5b58\u50a8":[0,1,4,6,7,8],"\u5b58\u5728":0,"\u5b58\u653e":[4,6,7],"\u5b88\u62a4":4,"\u5b8c\u6210":1,"\u5b9e\u65f6":4,"\u5b9e\u9645":[0,1,4,8],"\u5bf9\u5e94":[0,4,7],"\u5bf9\u9f50":4,"\u5bfc\u5165":4,"\u5bfc\u51fa":[4,7],"\u5c5e\u6027":7,"\u5de5\u7a0b":4,"\u5e74\u9f84":[4,7],"\u5e74\u9f84\u6bb5":[4,7],"\u5efa\u8bae":[0,7],"\u5f00\u59cb":[0,1,3,4,6,7,8],"\u5f02\u5e38":4,"\u5f15\u53d1":4,"\u5f39\u7a97":4,"\u5f53\u524d":[1,4],"\u5f53\u5929":4,"\u5f71\u7247":3,"\u5f85\u5904\u7406":[0,1],"\u5f97\u51fa":1,"\u5f97\u5230":[1,6],"\u6027\u522b":[4,7],"\u603b\u4f53":[0,1,7],"\u60c5\u51b5":[4,6],"\u60f3\u8981":7,"\u6240\u6709":[4,7],"\u6240\u9700":4,"\u6253\u5f00":4,"\u6267\u884c":4,"\u627e\u5230":4,"\u62a5\u9519":[4,7],"\u6307\u5b9a":7,"\u6309\u94ae":4,"\u6355\u6349":[1,4],"\u63a5\u53e3":7,"\u63a8\u8350":[0,1,4],"\u63cf\u8ff0":7,"\u63d0\u4f9b":[3,7,8],"\u63d0\u53d6":[0,8],"\u63d0\u793a":4,"\u63d2\u5165":[0,1,7],"\u641c\u7d22":2,"\u64ad\u653e":4,"\u653e\u5f03":7,"\u6570\u636e":[0,7],"\u6570\u7ec4":3,"\u6574\u4e2a":1,"\u6574\u90e8":3,"\u6587\u4ef6":[0,1,4,7,8],"\u6587\u4ef6\u5939":[0,4,7,8],"\u6587\u672c":[1,4,7],"\u6587\u672c\u6846":4,"\u65b9\u4fbf":4,"\u65b9\u5f0f":[0,1,3,7],"\u65b9\u6cd5":6,"\u65c1\u767d":[0,1,4,6,7],"\u65e0\u5b57\u5e55":6,"\u65e0\u6cd5":4,"\u65e5\u671f":4,"\u65f6\u6587":8,"\u65f6\u95f4":[0,1,3,4,6,7,8],"\u65f6\u95f4\u5dee":[0,1],"\u662f\u5426":[3,4,6],"\u663e\u793a":4,"\u6682\u65f6":7,"\u66f4\u65b0":4,"\u6700\u540e":3,"\u6700\u5927":3,"\u6700\u5927\u503c":3,"\u6700\u5c0f":3,"\u6700\u5c0f\u503c":3,"\u6700\u7ec8":3,"\u672a\u77e5":6,"\u672c\u5730":[0,8],"\u673a\u6570":3,"\u6807\u70b9":1,"\u6807\u70b9\u7b26\u53f7":1,"\u6807\u7b7e":4,"\u680f\u4e2d":4,"\u6821\u5bf9":7,"\u6821\u6b63":7,"\u6837\u4f8b":[4,7],"\u6839\u636e":[0,1,4,6,7],"\u683c\u5f0f":[4,7],"\u6846\u5b9a":1,"\u68c0\u67e5":4,"\u68c0\u6d4b":[0,1,3,4,6],"\u6a21\u5757":2,"\u6b63\u5e38":4,"\u6b63\u786e":4,"\u6b65\u9aa4":4,"\u6bcf\u4e2a":3,"\u6bcf\u6bb5":3,"\u6bcf\u79d2":1,"\u6bd4\u8f83":1,"\u6ca1\u6709":[1,3,4,7],"\u6d41\u7a0b":[0,1,7],"\u6d4b\u8bd5":3,"\u6df7\u5408":7,"\u6e90\u4ee3\u7801":[0,1,3,4,6,7,8],"\u7136\u540e":[3,4],"\u7247\u6bb5":3,"\u72b6\u6001":[0,1,4,6,7],"\u7406\u6027":4,"\u751f\u6210":[4,7],"\u7528\u4e8e":[0,1,4,7],"\u7528\u6237":[4,7],"\u7535\u5f71":1,"\u753b\u9762":[1,3],"\u754c\u9762":[4,6,7],"\u767e\u5206":4,"\u767e\u5206\u6bd4":4,"\u76d1\u6d4b":4,"\u76ee\u524d":8,"\u76f4\u63a5":3,"\u76f8\u4f3c":1,"\u76f8\u5173":[4,7],"\u786e\u5b9a":[1,3],"\u786e\u8ba4":4,"\u79d2\u6570":[4,7],"\u7a97\u53e3":4,"\u7b26\u53f7":1,"\u7b26\u5408":4,"\u7b2c\u4e00":[1,7],"\u7b2c\u4e00\u4e2a":1,"\u7b2c\u4e8c":1,"\u7b2c\u4e8c\u4e2a":1,"\u7b49\u5f85":4,"\u7b97\u6cd5":[0,1],"\u7c7b\u578b":[1,3,4,7,8],"\u7d22\u5f15":2,"\u7ebf\u7a0b":4,"\u7ec4\u4ef6":4,"\u7ec8\u6b62":[0,4,7],"\u7ed1\u5b9a":4,"\u7ed3\u675f":[0,1,3,4,6,7,8],"\u7ed3\u679c":3,"\u7ed9\u5b9a":0,"\u7f16\u7801":7,"\u804c\u8868\u5916":1,"\u80cc\u666f":8,"\u80cc\u666f\u97f3\u4e50":8,"\u80fd\u5426":[0,1],"\u811a\u672c":[0,4,7],"\u8303\u5316":1,"\u8303\u56f4":1,"\u83b7\u53d6":[0,1,4,7],"\u878d\u5408":7,"\u884c\u4e3a":7,"\u8868\u5185":0,"\u8868\u540d":1,"\u8868\u5728":7,"\u8868\u5934":[0,4,7],"\u8868\u683c":[0,1,4,6,7],"\u89c4\u8303":1,"\u89c4\u8303\u5316":1,"\u89c6\u9891":[0,1,3,4,6,7,8],"\u89c6\u9891\u6587\u4ef6":4,"\u89e3\u51b3":4,"\u89e3\u8bf4":[0,4,7],"\u89e6\u53d1":4,"\u8ba4\u4e3a":3,"\u8bb0\u5f55":4,"\u8bb2\u89e3":7,"\u8bbe\u7f6e":4,"\u8bc6\u522b":[0,1],"\u8be2\u95ee":4,"\u8bed\u8a00":7,"\u8bed\u901f":[4,7],"\u8bed\u97f3":[4,7],"\u8bf4\u8bdd":[4,7],"\u8bfb\u51fa":7,"\u8bfb\u53d6":[7,8],"\u8bfb\u8868":7,"\u8c03\u5927":7,"\u8c03\u6574":7,"\u8c03\u7528":[0,1,3,4,6,7],"\u8d77\u59cb":[0,7],"\u8d77\u6b62":7,"\u8def\u5f84":[1,4,7,8],"\u8f6c\u6362":[4,7],"\u8f93\u5165":4,"\u8f93\u51fa":[0,1,4,7],"\u8fb9\u754c":1,"\u8fc7\u7a0b":4,"\u8fd0\u884c":4,"\u8fd4\u56de":[1,3,4,7,8],"\u8fd9\u4e2a":7,"\u8fdb\u5ea6":[4,7],"\u8fdb\u5ea6\u6761":[4,7],"\u8fdb\u884c":[1,3,4,6,7],"\u8fde\u7eed":3,"\u9009\u5b9a":4,"\u9009\u62e9":[4,6,7],"\u9009\u9879":4,"\u901a\u4fe1":[0,1,4],"\u901a\u8baf":7,"\u901a\u8fc7":6,"\u914d\u7f6e":7,"\u914d\u7f6e\u6587\u4ef6":7,"\u91cd\u590d":1,"\u9519\u8bef":4,"\u95ee\u9898":4,"\u9664\u6f14":1,"\u968f\u673a":3,"\u968f\u673a\u6570":3,"\u9700\u8981":7,"\u975e\u4e2d\u6587":1,"\u97f3\u4e50":8,"\u97f3\u91cf":7,"\u97f3\u9891":[0,4,7,8],"\u97f3\u9891\u6587\u4ef6":7,"\u9875\u9762":[2,4],"\u987a\u4fbf":7,"\u9884\u671f":4,"\u9996\u5148":[0,1,4],"\u9ed8\u8ba4":4,"class":[4,7],"default":[0,1,4,6,7],"export":7,"float":[1,3,4,6,7,8],"import":[0,1,3,6,7],"int":[0,3,4,6,7],"true":[3,4],"with":[2,5],_type_:[],adjust:7,adjust_volum:7,all:4,all_speaker_info:4,and:7,arg:4,asr:[2,5,6],audio:[4,7,8],audio_dir:7,avi:4,azur:7,begin:1,book:[0,1,4,6,7],book_path:[0,1,4,6,7],bool:[3,4],by:4,caption:[4,7],caption_fil:7,caption_path:7,chang:7,change_speed_and_volum:7,check:4,check_sheet_cont:4,check_timepoint:4,choos:[4,7],choose_speak:7,choose_speaker_by_nam:4,close:4,confirm:4,confirm_video_path:4,content:[4,7],creat:[0,4],create_detail_dai:4,create_sheet:0,dai:4,detail:4,detect:[2,3,4,5],detect_movi:[3,6],detect_subtitl:[1,3],detect_with_asr:[2,5],detect_with_ocr:[2,5],dict:[4,7],dir:[4,7],end:[0,1,3,6,7,8],end_tim:[0,1,3,6,8],end_timestamp:7,erasepunc:1,excel:[0,7],export_capt:7,extract:8,extract_audio:8,fals:[3,4],file:[4,7],find:4,find_save_dir:4,find_save_fil:4,frame:3,from:[0,1,3,6,7],func:4,funcnam:4,get:[1,4,7],get_narratage_text:7,get_posit:1,get_sheethead:4,gui:[2,5],id:7,img:1,info:[4,7],init:7,init_speak:7,interv:[3,4],it:4,json:7,judeg:3,judege_subtitl:3,judg:[2,5],judge_subtitl:[2,5],kei:7,label:4,length:3,list:[0,3,4,7],log:4,main:[2,5],main_gui:[2,5],make:4,make_print_to_fil:4,mix:7,mix_speech:7,mkv:4,mov:4,movi:[3,6],mp4:4,name:[0,1,4,7],narratag:[2,5,7],narratage_detect:[2,5],narratage_path:7,ndarrai:[1,3],none:[0,1,6,7],normal:1,np:[1,3],numpi:[1,3],object:7,ocr:[2,5,6],on:4,on_clos:4,open:4,open_sheet_fil:4,open_video_fil:4,option:[0,1,4,6,7],or:[3,4],origin:7,output:7,output_dir:7,output_fil:7,p_label:4,param:4,path:[0,1,3,4,6,7,8],plai:4,play_audio:4,posit:1,print:4,process:[1,4],process_video:1,progressbar:4,random:3,random_int_list:3,read:7,read_sheet:7,rmvb:4,root:8,run:4,runthread:4,s1:1,s2:1,save:4,second:[4,7],second_to_str:7,set:4,set_caption_fil:4,sheet:[0,1,4,7],sheet_cont:7,sheet_nam:[0,1,7],sheet_path:7,sheethead:4,similar:1,speaker:[4,7],speaker_info:7,speaker_nam:7,speech:[2,5],speech_synthesi:[2,5],speed:7,split:[2,5],split_wav:[2,5],srt:7,ss:7,ss_and_export:7,start:[0,1,3,4,6,7,8],start_detect:4,start_process:4,start_synthesi:4,start_tim:[0,1,3,6,8],start_timestamp:7,state:[0,1,4,6,7],stop:[3,4],stop_detect:4,stop_synthesi:4,str:[0,1,3,4,6,7,8],string:1,string_similar:1,subtitl:[1,2,5,6],synthesi:[2,4,5],tab:4,text:[1,7],thread:4,thread_it:4,time:[0,1,3,6,8],timepoint:4,timestamp:7,tk:4,tkinter:4,to:[0,1,4,6,7],tran:4,trans_to_second:4,ttk:4,tts:7,tupl:[1,7],txt:1,type:4,ui:4,union:1,vad:0,valu:[0,7],valueerror:4,video:[0,1,3,4,6,7,8],video_path:[0,1,3,6,7,8],volum:7,wav:[2,5,7],wav_path:7,write:0,write_to_sheet:0},titles:["detect_with_asr","detect_with_ocr","Welcome to accessibility movie\u2019s documentation!","judge_subtitle","main_gui","accessibility_movie","narratage_detection","speech_synthesis","split_wav"],titleterms:{"with":[0,1],access:[2,5],accessibility_movi:5,and:2,api:2,asr:0,detect:[0,1,6],detect_with_asr:0,detect_with_ocr:1,document:2,gui:4,indic:2,judg:3,judge_subtitl:3,main:4,main_gui:4,movi:[2,5],narratag:6,narratage_detect:6,ocr:1,speech:7,speech_synthesi:7,split:8,split_wav:8,subtitl:3,synthesi:7,tabl:2,to:2,wav:8,welcom:2}})
\ No newline at end of file
......@@ -82,7 +82,7 @@
<li><p>将字幕导出为字幕文件;</p></li>
<li><p>调用azure提供的TTS接口(说话人由用户选择),合成旁白音频,存放到用户选择的文件夹中;</p></li>
<li><p>根据旁白的时间戳及文本、语速等信息,对应调整原视频中音频的音量。</p></li>
<li><p>将合成的旁白融合到原视频的音频中,并输出到用户选择的文件夹下。</p></li>
<li><p>将合成的旁白融合到原视频的音频中,并输出到用户选择的文件夹下。(暂时放弃)</p></li>
</ul>
</dd>
</dl>
......
......@@ -74,6 +74,16 @@
<section id="module-split_wav">
<span id="split-wav"></span><h1>split_wav<a class="headerlink" href="#module-split_wav" title="永久链接至标题"></a></h1>
<p>音频的一些前处理(目前仅提供音频提取功能)</p>
<dl class="simple">
<dt>主要包含以下内容:</dt><dd><ul class="simple">
<li><p>从视频中读取音频</p></li>
<li><p>将音频划分为n个文件,并存储到本地</p></li>
<li><p>从音频中提取人声</p></li>
<li><p>从音频中提取背景音乐</p></li>
</ul>
</dd>
</dl>
<dl class="py function">
<dt class="sig sig-object py" id="split_wav.extract_audio">
<span class="sig-prename descclassname"><span class="pre">split_wav.</span></span><span class="sig-name descname"><span class="pre">extract_audio</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">video_path</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">str</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">root</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">str</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">start_time</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">float</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">end_time</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">float</span></span></em><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">&#x2192;</span> <span class="sig-return-typehint"><span class="pre">str</span></span></span><a class="reference internal" href="_modules/split_wav.html#extract_audio"><span class="viewcode-link"><span class="pre">[源代码]</span></span></a><a class="headerlink" href="#split_wav.extract_audio" title="永久链接至目标"></a></dt>
......
......@@ -12,14 +12,6 @@ set BUILDDIR=build
if "%1" == "" goto help
if "%1" == "pdf" (
%SPHINXBUILD% -b pdf %ALLSPHINXOPTS% %BUILDDIR%/pdf
if errorlevel 1 exit /b 1
echo.
echo.Build finished. The pdf files are in %BUILDDIR%/pdf.
goto end
)
%SPHINXBUILD% >NUL 2>NUL
if errorlevel 9009 (
echo.
......
......@@ -26,3 +26,9 @@ Welcome to accessibility movie's documentation!
split_wav
Indices and tables
==================
* :ref:`genindex`
* :ref:`modindex`
* :ref:`search`
\ No newline at end of file
......@@ -111,7 +111,8 @@ def play_audio():
def create_detail_day() -> str:
"""生成当天日期
:return: [str], 当天日期
Returns:
str: 当天日期
"""
daytime = datetime.datetime.now().strftime('day' + '%Y_%m_%d')
return daytime
......
......@@ -3,6 +3,11 @@
主要是根据视频有无字幕,在基于OCR的方法和基于ASR的方法中进行选择调用。
(视频有无字幕的信息可以通过人机交互界面传入,也可以通过调用detect_movie函数检测得到)
.. code-block:: python
from narratage_detection import detect
detect(video_path, start_time, end_time, book_path, state, subtitle)
"""
import os.path
import argparse
......
"""音频的一些前处理(目前仅提供音频提取功能)
主要包含以下内容:
- 从视频中读取音频
- 将音频划分为n个文件,并存储到本地
- 从音频中提取人声
- 从音频中提取背景音乐
"""
# 最简单的是音轨分离,直接将背景音乐的轨道剥离,只剩下人声道后即可根据空白片段进行切割
# 只有一个音轨时,使用音乐检索系统,分割人声和背景音乐声
import os
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment