June 2018 Update
This commit is contained in:
parent
ba8067c3b7
commit
22f33d4004
5278 changed files with 84726 additions and 14379 deletions
2
Task/Speech-synthesis/AutoIt/speech-synthesis.autoit
Normal file
2
Task/Speech-synthesis/AutoIt/speech-synthesis.autoit
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
$voice = ObjCreate("SAPI.SpVoice")
|
||||
$voice.Speak("This is an example of speech synthesis.")
|
||||
26
Task/Speech-synthesis/Kotlin/speech-synthesis.kotlin
Normal file
26
Task/Speech-synthesis/Kotlin/speech-synthesis.kotlin
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
// Kotlin Native v0.6.2
|
||||
|
||||
import kotlinx.cinterop.*
|
||||
import platform.posix.*
|
||||
|
||||
fun talk(s: String) {
|
||||
val pid = fork()
|
||||
if (pid < 0) {
|
||||
perror("fork")
|
||||
exit(1)
|
||||
}
|
||||
if (pid == 0) {
|
||||
execlp("espeak", "espeak", s, null)
|
||||
perror("espeak")
|
||||
_exit(1)
|
||||
}
|
||||
memScoped {
|
||||
val status = alloc<IntVar>()
|
||||
waitpid(pid, status.ptr, 0)
|
||||
if (status.value > 0) println("Exit status was ${status.value}")
|
||||
}
|
||||
}
|
||||
|
||||
fun main(args: Array<String>) {
|
||||
talk("This is an example of speech synthesis.")
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue