{% extends "base.html" %}
{% block content %}
<form method="POST" action="/synthesis-setup" enctype="multipart/form-data">
    <div class="form-group">
        <label for="model">Model</label>
        <select class="form-control" id="model" name="model" onchange="selectModel()" required>
            {% for model in models %}
                <option value="{{model}}">{{model}}</option>
            {% endfor %}
        </select>
    </div>
    <div class="form-group">
        <label for="checkpoint">Checkpoint</label>
        <select class="form-control" id="checkpoint" name="checkpoint" required></select>
    </div>
    <div class="form-group">
        <label for="language">Language <a href="/settings">Add more</a></label>
        <select class="form-control" id="language" name="language" required>
            {% for language in languages %}
                <option value="{{language}}">{{language}}</option>
            {% endfor %}
        </select>
    </div>
    <div class="form-group">
        <label for="vocoder_type">Vocoder <a href="/settings">Add more</a> or <a href="/train-hifigan">Train a custom one</a></label>
        <select class="form-control" id="vocoder" name="vocoder" required>
            {% for option in hifigan_models %}
                <option value="{{ option }}">{{ option }}</option>
            {% endfor %}
        </select>
    </div>
    <input type="submit" class="btn btn-primary">
</form>
<script>
let checkpoints = {{ checkpoints|safe }};
let hifigan_custom_models = {{ hifigan_custom_models|safe }};
</script>
<script src="{{ url_for('static', filename='synthesis-setup.js') }}"></script>
{% endblock %}
