mirror of
https://github.com/SrIzan10/vdo.ninja.git
synced 2026-05-01 11:05:24 +00:00
88 lines
2.8 KiB
HTML
88 lines
2.8 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta content="text/html;charset=utf-8" http-equiv="Content-Type" />
|
|
<meta content="utf-8" http-equiv="encoding" />
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<title>Speech Synthesis Languages</title>
|
|
<style>
|
|
body {
|
|
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
|
|
background-color: #333;
|
|
color: #ddd;
|
|
display: flex;
|
|
flex-direction: column;
|
|
align-items: center;
|
|
justify-content: center;
|
|
margin: 0;
|
|
padding: 20px;
|
|
}
|
|
.container {
|
|
text-align: center;
|
|
max-width: 800px;
|
|
}
|
|
#languageSelect, table {
|
|
margin-top: 20px;
|
|
padding: 10px;
|
|
font-size: 16px;
|
|
background-color: #555;
|
|
color: #fff;
|
|
border: none;
|
|
border-radius: 5px;
|
|
}
|
|
table {
|
|
border-collapse: collapse;
|
|
width: 100%;
|
|
}
|
|
th, td {
|
|
border: 1px solid #777;
|
|
padding: 8px;
|
|
text-align: left;
|
|
}
|
|
th {
|
|
background-color: #444;
|
|
}
|
|
tr:nth-child(even) {
|
|
background-color: #555;
|
|
}
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<div class="container">
|
|
<h1>Available TTS Language Options</h1>
|
|
<select style='display:none;' id="languageSelect"></select>
|
|
<table id="voicesTable">
|
|
<tr>
|
|
<th>Name</th>
|
|
<th>Language</th>
|
|
<th>Local Service</th>
|
|
<th>Default</th>
|
|
</tr>
|
|
<!-- Rows will be populated here -->
|
|
</table>
|
|
</div>
|
|
<script>
|
|
document.addEventListener('DOMContentLoaded', () => {
|
|
const select = document.getElementById('languageSelect');
|
|
const table = document.getElementById('voicesTable');
|
|
|
|
function populateVoices() {
|
|
const voices = speechSynthesis.getVoices();
|
|
voices.forEach(voice => {
|
|
const option = document.createElement('option');
|
|
option.textContent = `${voice.name} (${voice.lang})`;
|
|
select.appendChild(option);
|
|
|
|
const row = table.insertRow();
|
|
row.insertCell().textContent = voice.name;
|
|
row.insertCell().textContent = voice.lang;
|
|
row.insertCell().textContent = voice.localService ? 'Yes' : 'No';
|
|
row.insertCell().textContent = voice.default ? 'Yes' : 'No';
|
|
});
|
|
}
|
|
|
|
speechSynthesis.onvoiceschanged = populateVoices;
|
|
});
|
|
</script>
|
|
</body>
|
|
</html> |