-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
291 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
[*.yml] | ||
tab_width = 2 | ||
end_of_line = lf | ||
insert_final_newline = true | ||
charset = utf-8 | ||
trim_trailing_whitespace = true | ||
indent_size = 2 | ||
indent_style = space |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
name: Generator | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Set up node | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: '20' | ||
- name: Set up Python 3.12 | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: 3.12 | ||
- name: Install dependencies | ||
run : | | ||
yarn install | ||
pip3 install edge-tts --break-system-packages | ||
- name: Generate voice | ||
run: | | ||
yarn gen | ||
- name: "Jekyll theme" | ||
run: mv ./_config.temp.yml ./dist/_config.yml | ||
|
||
- name: Deploy github pages | ||
uses: peaceiris/actions-gh-pages@v4 | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
publish_dir: ./dist | ||
enable_jekyll: true | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
.venv | ||
|
||
# Logs | ||
logs | ||
*.log | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
# kazakh-character-voices | ||
|
||
kazakh character voices |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
theme: jekyll-theme-cayman |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
{ | ||
"name": "kazakh-character-voices", | ||
"version": "1.0.0", | ||
"main": "index.js", | ||
"type": "module", | ||
"repository": "git@github.com:ha-pin/kazakh-character-voices.git", | ||
"author": "HerbertHe <Herbert.He0229@gmail.com>", | ||
"license": "GPL-3.0", | ||
"scripts": { | ||
"gen": "node scripts/index.js" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import fs from "fs" | ||
import path from "path" | ||
import { execSync } from "child_process" | ||
|
||
const distPath = path.resolve("dist") | ||
const charactersPath = path.join(distPath, "characters") | ||
const charactersSourcesPath = path.resolve("sources", "characters.map.json") | ||
|
||
const generator = () => { | ||
if (!fs.existsSync(charactersPath)) { | ||
fs.mkdirSync(charactersPath, { recursive: true }) | ||
} | ||
|
||
JSON.parse(fs.readFileSync(charactersSourcesPath, "utf8")).forEach( | ||
({ hapin, cyrillic }) => { | ||
execSync( | ||
`edge-tts --text ${cyrillic} --voice kk-KZ-DauletNeural --write-media ${path.join( | ||
charactersPath, | ||
`${hapin}.mp3` | ||
)}` | ||
) | ||
} | ||
) | ||
} | ||
|
||
generator() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,202 @@ | ||
[ | ||
{ | ||
"arabic": "ا", | ||
"cyrillic": "а", | ||
"hapin": "a" | ||
}, | ||
{ | ||
"arabic": "ب", | ||
"cyrillic": "б", | ||
"hapin": "b" | ||
}, | ||
{ | ||
"arabic": "د", | ||
"cyrillic": "д", | ||
"hapin": "d" | ||
}, | ||
{ | ||
"arabic": "ى", | ||
"cyrillic": "ы", | ||
"hapin": "e" | ||
}, | ||
{ | ||
"arabic": "ف", | ||
"cyrillic": "ф", | ||
"hapin": "f" | ||
}, | ||
{ | ||
"arabic": "گ", | ||
"cyrillic": "г", | ||
"hapin": "g" | ||
}, | ||
{ | ||
"arabic": "ح", | ||
"cyrillic": "х", | ||
"hapin": "h" | ||
}, | ||
{ | ||
"arabic": "ي", | ||
"cyrillic": "й", | ||
"hapin": "i" | ||
}, | ||
{ | ||
"arabic": "ج", | ||
"cyrillic": "ж", | ||
"hapin": "j" | ||
}, | ||
{ | ||
"arabic": "ك", | ||
"cyrillic": "к", | ||
"hapin": "k" | ||
}, | ||
{ | ||
"arabic": "ل", | ||
"cyrillic": "л", | ||
"hapin": "l" | ||
}, | ||
{ | ||
"arabic": "م", | ||
"cyrillic": "м", | ||
"hapin": "m" | ||
}, | ||
{ | ||
"arabic": "ن", | ||
"cyrillic": "н", | ||
"hapin": "n" | ||
}, | ||
{ | ||
"arabic": "و", | ||
"cyrillic": "о", | ||
"hapin": "o" | ||
}, | ||
{ | ||
"arabic": "پ", | ||
"cyrillic": "п", | ||
"hapin": "p" | ||
}, | ||
{ | ||
"arabic": "ق", | ||
"cyrillic": "қ", | ||
"hapin": "q" | ||
}, | ||
{ | ||
"arabic": "ر", | ||
"cyrillic": "р", | ||
"hapin": "r" | ||
}, | ||
{ | ||
"arabic": "س", | ||
"cyrillic": "с", | ||
"hapin": "s" | ||
}, | ||
{ | ||
"arabic": "ت", | ||
"cyrillic": "т", | ||
"hapin": "t" | ||
}, | ||
{ | ||
"arabic": "ۇ", | ||
"cyrillic": "ұ", | ||
"hapin": "u" | ||
}, | ||
{ | ||
"arabic": "ۆ", | ||
"cyrillic": "в", | ||
"hapin": "v" | ||
}, | ||
{ | ||
"arabic": "ۋ", | ||
"cyrillic": "у", | ||
"hapin": "w" | ||
}, | ||
{ | ||
"arabic": "ز", | ||
"cyrillic": "з", | ||
"hapin": "z" | ||
}, | ||
{ | ||
"arabic": "ە", | ||
"cyrillic": "е", | ||
"hapin": "ye" | ||
}, | ||
{ | ||
"arabic": "ع", | ||
"cyrillic": "ғ", | ||
"hapin": "gh" | ||
}, | ||
{ | ||
"arabic": "ھ", | ||
"cyrillic": "һ", | ||
"hapin": "hh" | ||
}, | ||
{ | ||
"arabic": "ڭ", | ||
"cyrillic": "ң", | ||
"hapin": "ng" | ||
}, | ||
{ | ||
"arabic": "ش", | ||
"cyrillic": "ш", | ||
"hapin": "sh" | ||
}, | ||
{ | ||
"arabic": "چ", | ||
"cyrillic": "ч", | ||
"hapin": "ch" | ||
}, | ||
{ | ||
"arabic": "ٴا ", | ||
"cyrillic": "ә", | ||
"hapin": "xa" | ||
}, | ||
{ | ||
"arabic": "ٴى ", | ||
"cyrillic": "і", | ||
"hapin": "xe" | ||
}, | ||
{ | ||
"arabic": "ٴو", | ||
"cyrillic": "ө", | ||
"hapin": "xo" | ||
}, | ||
{ | ||
"arabic": "ٴۇ", | ||
"cyrillic": "ү", | ||
"hapin": "xu" | ||
}, | ||
{ | ||
"arabic": "ٴۇ", | ||
"cyrillic": "ү", | ||
"hapin": "yu" | ||
}, | ||
{ | ||
"arabic": "يو", | ||
"cyrillic": "ё", | ||
"hapin": "yo" | ||
}, | ||
{ | ||
"arabic": "ي", | ||
"cyrillic": "и", | ||
"hapin": "yi" | ||
}, | ||
{ | ||
"arabic": "تس", | ||
"cyrillic": "ц", | ||
"hapin": "c" | ||
}, | ||
{ | ||
"arabic": "يۋ", | ||
"cyrillic": "ю", | ||
"hapin": "yw" | ||
}, | ||
{ | ||
"arabic": "يا", | ||
"cyrillic": "я", | ||
"hapin": "ya" | ||
}, | ||
{ | ||
"arabic": "", | ||
"cyrillic": "э", | ||
"hapin": "yy" | ||
} | ||
] |