Add audiowidget endpoint: Blueprint renders audiowidget.tmpl, PaneCP fetches it on synthesis completion
This commit is contained in:
18
templates/vue3_neusik/audiowidget.tmpl.stub
Normal file
18
templates/vue3_neusik/audiowidget.tmpl.stub
Normal file
@@ -0,0 +1,18 @@
|
||||
{# audiowidget.tmpl.stub — copy to audiowidget.tmpl in the same directory to activate.
|
||||
Customise to match your site's look and feel.
|
||||
|
||||
Context variables (passed as query params by the score editor):
|
||||
result_url – URL of the rendered MP3, or empty string
|
||||
errors – synthesis error message, or empty string
|
||||
#}
|
||||
{% if errors %}
|
||||
<div class="se-error">{{ errors }}</div>
|
||||
{% elif result_url %}
|
||||
<figure class="audio-result">
|
||||
<figcaption>Rendered result</figcaption>
|
||||
<audio controls preload="metadata" style="display:block;width:100%">
|
||||
<source src="{{ result_url }}" type="audio/mpeg">
|
||||
<a href="{{ result_url }}">Download MP3</a>
|
||||
</audio>
|
||||
</figure>
|
||||
{% endif %}
|
||||
Reference in New Issue
Block a user