|
|
<!DOCTYPE html> |
|
|
<html lang="en"> |
|
|
{{template "views/partials/head" .}} |
|
|
<script defer src="static/talk.js"></script> |
|
|
<body class="bg-[#101827] text-[#E5E7EB]" x-data="{ key: $store.chat.key }"> |
|
|
<div class="flex flex-col min-h-screen"> |
|
|
|
|
|
{{template "views/partials/navbar" .}} |
|
|
|
|
|
<div class="container mx-auto px-4 py-8 flex-grow"> |
|
|
|
|
|
<div class="hero-section"> |
|
|
<div class="hero-content"> |
|
|
<h1 class="hero-title"> |
|
|
<i class="fas fa-comments mr-2"></i>Talk Interface |
|
|
</h1> |
|
|
<p class="hero-subtitle">Speak with your AI models using voice interaction</p> |
|
|
</div> |
|
|
</div> |
|
|
|
|
|
|
|
|
<div class="max-w-3xl mx-auto"> |
|
|
<div class="card overflow-hidden"> |
|
|
|
|
|
<div class="p-6"> |
|
|
|
|
|
<div id="recording" class="bg-red-500/10 border border-red-500/30 rounded-lg p-4 mb-4 flex items-center space-x-3" style="display: none;"> |
|
|
<i class="fa-solid fa-microphone text-2xl text-red-400"></i> |
|
|
<span class="text-red-300 font-medium">Recording... press "Stop recording" to stop</span> |
|
|
</div> |
|
|
|
|
|
|
|
|
<div id="loader" class="my-4 flex justify-center" style="display: none;"> |
|
|
<div class="animate-spin rounded-full h-10 w-10 border-t-2 border-b-2 border-[#38BDF8]"></div> |
|
|
</div> |
|
|
|
|
|
|
|
|
<div id="statustext" class="my-4 p-3 bg-[#101827]/50 border border-[#1E293B] rounded-lg text-[#E5E7EB]" style="min-height: 3rem;">Press the record button to start recording.</div> |
|
|
|
|
|
|
|
|
<div class="bg-[#38BDF8]/10 border border-[#38BDF8]/20 rounded-lg p-4 mb-6"> |
|
|
<div class="flex items-start"> |
|
|
<i class="fas fa-info-circle text-[#38BDF8] mt-1 mr-3 flex-shrink-0"></i> |
|
|
<p class="text-[#94A3B8]"> |
|
|
<strong class="text-[#38BDF8]">Note:</strong> You need an LLM, an audio-transcription (whisper), and a TTS model installed for this to work. Select the appropriate models below and click 'Talk' to start recording. The recording will continue until you click 'Stop recording'. Make sure your microphone is set up and enabled. |
|
|
</p> |
|
|
</div> |
|
|
</div> |
|
|
|
|
|
|
|
|
<div class="grid grid-cols-1 md:grid-cols-3 gap-6 mb-6"> |
|
|
|
|
|
<div class="space-y-2"> |
|
|
<label for="modelSelect" class="flex items-center text-[#94A3B8] font-medium"> |
|
|
<i class="fas fa-brain text-[#38BDF8] mr-2"></i>LLM Model |
|
|
</label> |
|
|
<select id="modelSelect" |
|
|
class="w-full bg-[#101827] text-[#E5E7EB] border border-[#1E293B] focus:border-[#38BDF8] focus:ring-2 focus:ring-[#38BDF8]/50 rounded-lg shadow-sm p-2.5 appearance-none"> |
|
|
<option value="" disabled class="text-[#94A3B8]">Select a model</option> |
|
|
{{ range .ModelsConfig }} |
|
|
<option value="{{.}}" class="bg-[#101827] text-[#E5E7EB]">{{.}}</option> |
|
|
{{ end }} |
|
|
</select> |
|
|
</div> |
|
|
|
|
|
|
|
|
<div class="space-y-2"> |
|
|
<label for="whisperModelSelect" class="flex items-center text-[#94A3B8] font-medium"> |
|
|
<i class="fas fa-ear-listen text-[#8B5CF6] mr-2"></i>Whisper Model |
|
|
</label> |
|
|
<select id="whisperModelSelect" |
|
|
class="w-full bg-[#101827] text-[#E5E7EB] border border-[#1E293B] focus:border-[#8B5CF6] focus:ring-2 focus:ring-[#8B5CF6]/50 rounded-lg shadow-sm p-2.5 appearance-none"> |
|
|
<option value="" disabled class="text-[#94A3B8]">Select a model</option> |
|
|
{{ range .ModelsConfig }} |
|
|
<option value="{{.}}" class="bg-[#101827] text-[#E5E7EB]">{{.}}</option> |
|
|
{{ end }} |
|
|
</select> |
|
|
</div> |
|
|
|
|
|
|
|
|
<div class="space-y-2"> |
|
|
<label for="ttsModelSelect" class="flex items-center text-[#94A3B8] font-medium"> |
|
|
<i class="fas fa-volume-high text-green-400 mr-2"></i>TTS Model |
|
|
</label> |
|
|
<select id="ttsModelSelect" |
|
|
class="w-full bg-[#101827] text-[#E5E7EB] border border-[#1E293B] focus:border-green-500 focus:ring-2 focus:ring-green-500/50 rounded-lg shadow-sm p-2.5 appearance-none"> |
|
|
<option value="" disabled class="text-[#94A3B8]">Select a model</option> |
|
|
{{ range .ModelsConfig }} |
|
|
<option value="{{.}}" class="bg-[#101827] text-[#E5E7EB]">{{.}}</option> |
|
|
{{ end }} |
|
|
</select> |
|
|
</div> |
|
|
</div> |
|
|
|
|
|
|
|
|
<div class="flex items-center justify-between mt-8"> |
|
|
<button id="recordButton" |
|
|
class="inline-flex items-center bg-red-500 hover:bg-red-600 text-white font-semibold py-2 px-6 rounded-lg transition-colors"> |
|
|
<i class="fas fa-microphone mr-2"></i> |
|
|
<span>Talk</span> |
|
|
</button> |
|
|
|
|
|
<a id="resetButton" |
|
|
class="flex items-center text-[#38BDF8] hover:text-[#8B5CF6] transition-colors" |
|
|
href="#"> |
|
|
<i class="fas fa-rotate-right mr-2"></i> |
|
|
<span>Reset conversation</span> |
|
|
</a> |
|
|
</div> |
|
|
|
|
|
|
|
|
<audio id="audioPlayback" controls hidden></audio> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
|
|
|
{{template "views/partials/footer" .}} |
|
|
</div> |
|
|
</body> |
|
|
</html> |