iOS Speak Japanese.

 

    AVSpeechSynthesizer* speechSynthesizer = [[AVSpeechSynthesizer alloc] init];

    
   NSString* speakingText = @"おはよう!北海道函館市沖の津軽海峡で27日に転覆した作業船「第18明祐」(19トン、4人乗り)から28日、約15時間ぶりに船室から救助された甲板員、永田勝行さん(64)=長崎市=は、船体が傾いて船室に「空気だまり」ができたため、一命を取り留めたとみられる。第1管区海上保安本部(小樽市)は「非常に幸運だった。救助できたのは奇跡だ」と話す。(毎日新聞)";
    AVSpeechUtterance *utterance = [AVSpeechUtterance speechUtteranceWithString:speakingText];
  
    
    
   
    AVSpeechSynthesisVoice* JVoice = [AVSpeechSynthesisVoice voiceWithLanguage:@"ja-JP"];
    
    utterance.voice =  JVoice;
     [AVSpeechSynthesisVoice speechVoices];
    utterance.rate = AVSpeechUtteranceMinimumSpeechRate; // Tell it to me slowly
    
    [speechSynthesizer speakUtterance:utterance];

You can set one of the bellow language:

 for (AVSpeechSynthesisVoice *voice in [AVSpeechSynthesisVoice speechVoices]) {
            NSLog(@" %@", voice.language);
        }

this is the list with the supported languages:

Arabic (Saudi Arabia) - ar-SA
Chinese (China) - zh-CN
Chinese (Hong Kong SAR China) - zh-HK
Chinese (Taiwan) - zh-TW
Czech (Czech Republic) - cs-CZ
Danish (Denmark) - da-DK
Dutch (Belgium) - nl-BE
Dutch (Netherlands) - nl-NL
English (Australia) - en-AU
English (Ireland) - en-IE
English (South Africa) - en-ZA
English (United Kingdom) - en-GB
English (United States) - en-US
Finnish (Finland) - fi-FI
French (Canada) - fr-CA
French (France) - fr-FR
German (Germany) - de-DE
Greek (Greece) - el-GR
Hebrew (Israel) - he-IL
Hindi (India) - hi-IN
Hungarian (Hungary) - hu-HU
Indonesian (Indonesia) - id-ID
Italian (Italy) - it-IT
Japanese (Japan) - ja-JP
Korean (South Korea) - ko-KR
Norwegian (Norway) - no-NO
Polish (Poland) - pl-PL
Portuguese (Brazil) - pt-BR
Portuguese (Portugal) - pt-PT
Romanian (Romania) - ro-RO
Russian (Russia) - ru-RU
Slovak (Slovakia) - sk-SK
Spanish (Mexico) - es-MX
Spanish (Spain) - es-ES
Swedish (Sweden) - sv-SE
Thai (Thailand) - th-TH
Turkish (Turkey) - tr-TR

By admin-powenko

Dr. Powen Ko is a teacher and CEO on LoopTek LLC, and like to teaching. if you need to class, please let PowenKo know, he will love to service and sharing. LoopTek web site is www.looptek.com

Leave a Reply