<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>实时监听频率</title>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/socket.io/4.7.2/socket.io.min.js"></script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/Chart.js/3.9.1/chart.min.js"></script>
    <link rel="stylesheet" href="{{ url_for('static', filename='css/style.css') }}">
</head>
<body>
    <div class="main-container">
        <div class="panel">
            <h1>机器人音频监控</h1>

            <div class="controls">
                <button id="listenButton">开始实时监听</button>
                <span id="listenStatus" class="status">状态: 未监听</span>
            </div>

            <div class="controls">
                <button id="startButton">开始工作 (录制)</button>
                <button id="stopButton" disabled>结束工作</button>
                <span id="recordingStatus" class="status">状态: 未工作</span>
            </div>

            <h2 class="chart-title">实时监听频率（近 20 秒）</h2>
            <div class="chart-container">
                <canvas id="frequencyChart"></canvas>
            </div>
        </div>
    </div>

    <script src="{{ url_for('static', filename='js/app.js') }}"></script>
</body>
</html>
