Update README.md
Browse files<!DOCTYPE html>
<html lang="ha">
<head>
<meta charset="UTF-8">
<title>Mai Karanta Rubutun Hausa</title>
<style>
body {
font-family: Arial, sans-serif;
background-color: #f5f5f5;
text-align: center;
padding: 20px;
}
textarea {
width: 90%;
height: 200px;
font-size: 18px;
padding: 10px;
}
button {
font-size: 18px;
margin: 10px;
padding: 10px 20px;
cursor: pointer;
border-radius: 10px;
}
#playBtn {
background-color: green;
color: white;
}
</style>
</head>
<body>
<h1>Mai Karanta Rubutun Hausa</h1>
<textarea id="rubutu" placeholder="Shigar da rubutun Hausa anan..."></textarea><br>
<button id="playBtn" onclick="karantaRubutu()">Karanta da Murya</button>
<script>
function karantaRubutu() {
const rubutu = document.getElementById("rubutu").value;
if (!rubutu.trim()) {
alert("Da farko shigar da rubutun Hausa.");
return;
}
const msg = new SpeechSynthesisUtterance(rubutu);
msg.lang = 'ha'; // Hausa language code
msg.rate = 1;
msg.pitch = 1;
// Fall-back: idan browser baya goyan bayan Hausa sosai
const supportedVoices = speechSynthesis.getVoices();
const hausaVoice = supportedVoices.find(v => v.lang.startsWith('ha'));
if (hausaVoice) {
msg.voice = hausaVoice;
}
speechSynthesis.speak(msg);
}
</script>
</body>
</html>
@@ -1,3 +1,63 @@
|
|
1 |
-
|
2 |
-
|
3 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
|
2 |
+
---<!DOCTYPE html>
|
3 |
+
<html lang="ha">
|
4 |
+
<head>
|
5 |
+
<meta charset="UTF-8">
|
6 |
+
<title>Mai Karanta Rubutun Hausa</title>
|
7 |
+
<style>
|
8 |
+
body {
|
9 |
+
font-family: Arial, sans-serif;
|
10 |
+
background-color: #f5f5f5;
|
11 |
+
text-align: center;
|
12 |
+
padding: 20px;
|
13 |
+
}
|
14 |
+
textarea {
|
15 |
+
width: 90%;
|
16 |
+
height: 200px;
|
17 |
+
font-size: 18px;
|
18 |
+
padding: 10px;
|
19 |
+
}
|
20 |
+
button {
|
21 |
+
font-size: 18px;
|
22 |
+
margin: 10px;
|
23 |
+
padding: 10px 20px;
|
24 |
+
cursor: pointer;
|
25 |
+
border-radius: 10px;
|
26 |
+
}
|
27 |
+
#playBtn {
|
28 |
+
background-color: green;
|
29 |
+
color: white;
|
30 |
+
}
|
31 |
+
</style>
|
32 |
+
</head>
|
33 |
+
<body>
|
34 |
+
<h1>Mai Karanta Rubutun Hausa</h1>
|
35 |
+
<textarea id="rubutu" placeholder="Shigar da rubutun Hausa anan..."></textarea><br>
|
36 |
+
<button id="playBtn" onclick="karantaRubutu()">Karanta da Murya</button>
|
37 |
+
|
38 |
+
<script>
|
39 |
+
function karantaRubutu() {
|
40 |
+
const rubutu = document.getElementById("rubutu").value;
|
41 |
+
if (!rubutu.trim()) {
|
42 |
+
alert("Da farko shigar da rubutun Hausa.");
|
43 |
+
return;
|
44 |
+
}
|
45 |
+
|
46 |
+
const msg = new SpeechSynthesisUtterance(rubutu);
|
47 |
+
msg.lang = 'ha'; // Hausa language code
|
48 |
+
msg.rate = 1;
|
49 |
+
msg.pitch = 1;
|
50 |
+
|
51 |
+
// Fall-back: idan browser baya goyan bayan Hausa sosai
|
52 |
+
const supportedVoices = speechSynthesis.getVoices();
|
53 |
+
const hausaVoice = supportedVoices.find(v => v.lang.startsWith('ha'));
|
54 |
+
if (hausaVoice) {
|
55 |
+
msg.voice = hausaVoice;
|
56 |
+
}
|
57 |
+
|
58 |
+
speechSynthesis.speak(msg);
|
59 |
+
}
|
60 |
+
</script>
|
61 |
+
</body>
|
62 |
+
</html>
|
63 |
+
|