Last active
January 23, 2023 17:07
-
-
Save mshafiee/5017d94516784c016a96a58ee3e6f5ff to your computer and use it in GitHub Desktop.
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
# This script is a command line tool that reads German conjugations of the verb "sein" (to be) | |
# in the present tense using Festival TTS engine on Linux. The script declares an array of strings, | |
# each string containing a conjugation of the verb "sein" for a different personal pronoun. | |
# Then, it uses an infinite while loop to iterate over the array, reading each conjugation 60 times | |
# with a sleep of 1 second in between each reading. The script uses the echo "$i" | festival --tts -voice de | |
# command to read the current string in the array, where -voice de option is added to the festival --tts command, | |
# which causes the TTS engine to use a German voice. The script is useful for language learners who want to | |
# practice the conjugations of the verb "sein" in the present tense on Linux. | |
# How to install festival: | |
# sudo apt-get install festival | |
#!/bin/bash | |
# Declare an array of strings | |
strings=("ich bin" "du bist" "er ist" "sie ist" "es ist" "wir sind" "ihr seid" "sie sind") | |
while true; do | |
# Iterate over the array using a for loop | |
for i in "${strings[@]}" | |
do | |
for j in {1..60} | |
do | |
echo "$i" | festival --tts -voice de | |
sleep 1 | |
done | |
done | |
done |
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
# This script is a command line tool that reads German conjugations of the verb "sein" (to be) | |
# in the present tense using the built-in MacOS TTS engine. The script declares an array of strings, | |
# each string containing a conjugation of the verb "sein" for a different personal pronoun. | |
# Then, it uses an infinite while loop to iterate over the array, reading each conjugation 60 times | |
# with a sleep of 1 second in between each reading. The script uses the -r 100 option to the say command | |
# to change the speaking rate to 100 words per minute, making the speech slower than the default rate. | |
# The script is useful for language learners who want to practice the conjugations of the verb "sein" | |
# in the present tense. | |
#!/bin/bash | |
# Declare an array of strings | |
strings=("ich bin" "du bist" "er ist" "sie ist" "es ist" "wir sind" "ihr seid" "sie sind") | |
while true; do | |
# Iterate over the array using a for loop | |
for i in "${strings[@]}" | |
do | |
for j in {1..60} | |
do | |
say -v Anna -r 100 "$i" | |
sleep 1 | |
done | |
done | |
done |
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
<# | |
This script is a command-line tool that reads German conjugations of the verb "sein" (to be) in the present tense using the built-in Text-to-Speech (TTS) functionality on Windows. | |
The script declares an array of strings, each string containing a conjugation of the verb "sein" for a different personal pronoun. | |
Then, it uses an infinite while loop to iterate over the array, reading each conjugation 60 times with a sleep of 1 second in between each reading. | |
The script uses the Add-Type -AssemblyName System.Speech to load the TTS functionality, creates a new TTS object using New-Object -TypeName System.Speech.Synthesis.SpeechSynthesizer and set the speaking rate using $speak.Rate = -1. | |
The $speak.Speak($i) command is used to read the current string in the array. | |
This script is useful for language learners who want to practice the conjugations of the verb "sein" in the present tense on Windows. | |
Microsoft Harman Kardon Desktop is a German TTS voice for Windows, it's part of the Microsoft Speech Platform and it's not installed by default on all Windows versions, it needs to be installed separately. Here are the instructions to install Microsoft Harman Kardon Desktop on Windows: | |
1- Make sure you have the Microsoft Speech Platform installed. You can check if it's already installed by going to Control Panel > Programs and Features, and looking for "Microsoft Speech Platform - Software Development Kit (SDK) (Version 11)". If it's not installed, you can download it from the Microsoft website. | |
2- Download the Microsoft Harman Kardon Desktop TTS voice package from the Microsoft website, it's named "Microsoft Speech Platform - Runtime Languages (Version 11)". | |
3- Run the installer for the TTS voice package. The installer will prompt you to select the components you want to install. Make sure to select the "Microsoft Harman Kardon Desktop" option. | |
4- Follow the prompts to complete the installation. | |
5- Once the installation is complete, you should be able to see the "Microsoft Harman Kardon Desktop" voice in the TTS settings on your Windows. | |
#> | |
Add-Type -AssemblyName System.Speech | |
$strings = @("ich bin", "du bist", "er ist", "sie ist", "es ist", "wir sind", "ihr seid", "sie sind") | |
while ($true) { | |
foreach ($i in $strings) { | |
for ($j=1; $j -le 60; $j++) { | |
$speak = New-Object -TypeName System.Speech.Synthesis.SpeechSynthesizer | |
$speak.Rate = -1 | |
$speak.SelectVoice("Microsoft Harman Kardon Desktop") | |
$speak.Speak($i) | |
Start-Sleep -Seconds 1 | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment