i'm working on a system that include an audio annotation for every word. I have no problem when it comes to English Pronunciation of words. I'm using this Sapi code

Dim Sapi
Sapi= createobject("sapi.spvoice")
sapi.speak("label1.text")

But is there a way i can also use this code when it comes to Korean and Japanese? Thank you very much. Please help me.

Dani AI

Generated

Short answer: yes — but only if a SAPI/.NET voice for those languages is available on the machine, or you use a cloud TTS service. , your one-line SAPI test speaks English because an English voice is installed. To get Japanese or Korean you must either install SAPI-compatible JA/KO voices (Microsoft Speech Platform or third-party engines) or call a cloud TTS (Azure/Google/AWS) that has high-quality Japanese/Korean voices.

A local, .NET-friendly workflow

  • Install the language voices on the server/PC you will run on.
  • From .NET enumerate installed voices, pick the one whose Culture is "ja-JP" or "ko-KR", and generate a WAV/MP3 that you then serve to the browser. Generating files is safer for ASP.NET than trying to play audio on the server device.

VB.NET example (System.Speech):

Imports System.Speech.Synthesis

Dim synth As New SpeechSynthesizer()
For Each v In synth.GetInstalledVoices()
    Dim info = v.VoiceInfo
    Console.WriteLine(info.Name & " => " & info.Culture.Name)
    If info.Culture.Name = "ja-JP" Or info.Culture.Name = "ko-KR" Then
        synth.SelectVoice(info.Name)
        synth.SetOutputToWaveFile("sample_" & info.Culture.Name & ".wav")
        ' In production pass a Unicode string (source file or DB must be UTF-8/Unicode)
        synth.Speak("konnichiwa_or_annyeong")
        Exit For
    End If
Next

Quick Python/cloud options

  • For quick tests use gTTS (internet) or pyttsx3 (uses local SAPI voices).
    from gtts import gTTS
    tts = gTTS("konnichiwa", lang="ja")
    tts.save("ja.mp3")

    For production, prefer Azure/Google/AWS TTS for quality, stability and licensing.

Troubleshooting/cautions

  • Verify voices actually installed (enumerate them in code).
  • On IIS, watch app pool bitness (32/64-bit) vs voice binaries.
  • Always treat input as Unicode (UTF-8) when sending non-Latin text.
  • Many commercial voices require licenses.

References: System.Speech API docs (enumeration/select) and a modern cloud-voices catalog for production choices:

Recommended Answers

All 2 Replies

Hi,

I think you can find some information, here. And specially step 3 .

thank you very much for the reply. but they built it in c++ i think?.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.