Archived
4
2

Merge pull request '[I75] Fix missing show transcipts[' (#76) from I75_Fix-missing-show-transcipts into main

Reviewed-on: #76
This commit is contained in:
Roan Horning 2023-02-25 00:06:18 +00:00
commit f84ee71b7c
4 changed files with 19 additions and 10 deletions

View File

@ -2,6 +2,7 @@
<!--% PROCESS 'shared-avatar.tpl.html' %--> <!--% PROCESS 'shared-avatar.tpl.html' %-->
<!--% PROCESS 'shared-utils.tpl.html' %--> <!--% PROCESS 'shared-utils.tpl.html' %-->
<!--% PROCESS 'shared-listen-now.tpl.html' %--> <!--% PROCESS 'shared-listen-now.tpl.html' %-->
<!--% PROCESS 'shared-show-transcript.tpl.html' %-->
<!--% PROCESS "queries-episode-${constants.database}.tpl.html" %--> <!--% PROCESS "queries-episode-${constants.database}.tpl.html" %-->
<!--% USE DBI(constants.driver, constants.user, constants.password) %--> <!--% USE DBI(constants.driver, constants.user, constants.password) %-->
<!--% query_episodes = DBI.prepare(query_episode_maxmin) <!--% query_episodes = DBI.prepare(query_episode_maxmin)
@ -28,15 +29,8 @@ Hosted by <a href="<!--% absolute_path(baseurl) %-->correspondents/<!--% zero_pa
<div><!--% episode.notes %--></div> <div><!--% episode.notes %--></div>
<footer> <footer>
<h2>Show Transcript</h2> <!--% show_transcript(episode, "hpr", baseurl, media_baseurl) %-->
<p>Automatically generated using <a href="https://github.com/openai/whisper">whisper</a>
<pre><code>whisper --model tiny --language en hpr0010.wav</code></pre></p>
<ul>
<li>Text: <a href="<!--% media_path(episode.id, episode_type, 'txt', baseurl, media_baseurl) %-->">hpr<!--% zero_pad_left(episode.id) %-->.txt</a></li>
<li><a href="https://en.wikipedia.org/wiki/WebVTT">WebVTT</a>: <a href="<!--% media_path(episode.id, episode_type, 'vtt', baseurl, media_baseurl) %-->">hpr<!--% zero_pad_left(episode.id) %-->.vtt</a></li>
<li><a href="https://en.wikipedia.org/wiki/SubRip">SubRip</a>: <a href="<!--% media_path(episode.id, episode_type, 'srt', baseurl, media_baseurl) %-->">hpr<!--% zero_pad_left(episode.id) %-->.srt</a></li>
</ul>
<!--% listen_now(episode, "hpr", baseurl, media_baseurl) %--> <!--% listen_now(episode, "hpr", baseurl, media_baseurl) %-->
<p> <p>
<!--% episode_navigation %--> <!--% episode_navigation %-->

View File

@ -1,6 +1,7 @@
<!--% PROCESS 'shared-avatar.tpl.html' %--> <!--% PROCESS 'shared-avatar.tpl.html' %-->
<!--% PROCESS 'shared-utils.tpl.html' %--> <!--% PROCESS 'shared-utils.tpl.html' %-->
<!--% PROCESS 'shared-listen-now.tpl.html' %--> <!--% PROCESS 'shared-listen-now.tpl.html' %-->
<!--% PROCESS 'shared-show-transcript.tpl.html' %-->
<!--% PROCESS 'shared-call_for_shows.tpl.html' %--> <!--% PROCESS 'shared-call_for_shows.tpl.html' %-->
<!--% INCLUDE 'content-index-announcement.tpl.html' %--> <!--% INCLUDE 'content-index-announcement.tpl.html' %-->
<!--% PROCESS "queries-index-${constants.database}.tpl.html" %--> <!--% PROCESS "queries-index-${constants.database}.tpl.html" %-->
@ -51,6 +52,8 @@
</header> </header>
<!--% latest_episodes.notes %--> <!--% latest_episodes.notes %-->
<footer> <footer>
<!--% show_transcript(latest_episodes, "hpr", baseurl, media_baseurl) %-->
<!--% listen_now(latest_episodes, "hpr", baseurl, media_baseurl) %--> <!--% listen_now(latest_episodes, "hpr", baseurl, media_baseurl) %-->
</footer> </footer>
</article> </article>

View File

@ -0,0 +1,12 @@
<!--% MACRO show_transcript(episode, episode_type, baseurl, media_baseurl) BLOCK %-->
<h2>Show Transcript</h2>
<p>Automatically generated using <a href="https://github.com/openai/whisper">whisper</a>
<pre><code>whisper --model tiny --language en hpr<!--% zero_pad_left(episode.id) %-->.wav</code></pre></p>
<ul>
<li>Text: <a href="<!--% media_path(episode.id, episode_type, 'txt', baseurl, media_baseurl) %-->">hpr<!--% zero_pad_left(episode.id) %-->.txt</a></li>
<li><a href="https://en.wikipedia.org/wiki/WebVTT">WebVTT</a>: <a href="<!--% media_path(episode.id, episode_type, 'vtt', baseurl, media_baseurl) %-->">hpr<!--% zero_pad_left(episode.id) %-->.vtt</a></li>
<li><a href="https://en.wikipedia.org/wiki/SubRip">SubRip</a>: <a href="<!--% media_path(episode.id, episode_type, 'srt', baseurl, media_baseurl) %-->">hpr<!--% zero_pad_left(episode.id) %-->.srt</a></li>
</ul>
<!--% END %-->

View File

@ -63,7 +63,7 @@
<!--% USE String(transcription_types) %--> <!--% USE String(transcription_types) %-->
<!--% USE String(media_baseurl) %--> <!--% USE String(media_baseurl) %-->
<!--% IF transcription_types.search(media_type) && media_baseurl.search('archive.org') %--> <!--% IF transcription_types.search(media_type) && media_baseurl.search('archive.org') %-->
<!--% media_baseurl = "${media_baseurl}hpr\$eps_id/hpr" %--> <!--% media_baseurl = "${media_baseurl}hpr\$eps_id/" %-->
<!--% END %--> <!--% END %-->
<!--% media_folder = "" %--> <!--% media_folder = "" %-->
<!--% media_baseurl = media_baseurl.replace('\$eps_id', zero_pad_left(episode_id)) %--> <!--% media_baseurl = media_baseurl.replace('\$eps_id', zero_pad_left(episode_id)) %-->