{"id":297,"date":"2011-09-03T19:48:50","date_gmt":"2011-09-03T10:48:50","guid":{"rendered":"http:\/\/www.ka-net.org\/blog\/?p=297"},"modified":"2012-02-15T00:21:37","modified_gmt":"2012-02-14T15:21:37","slug":"vba%e3%81%a7tts%e3%82%a8%e3%83%b3%e3%82%b8%e3%83%b3%e3%81%ae%e5%90%84%e7%a8%ae%e6%83%85%e5%a0%b1%e3%82%92%e5%88%97%e6%8c%99%e3%81%99%e3%82%8b","status":"publish","type":"post","link":"https:\/\/www.ka-net.org\/blog\/?p=297","title":{"rendered":"VBA\u3067TTS\u30a8\u30f3\u30b8\u30f3\u306e\u5404\u7a2e\u60c5\u5831\u3092\u5217\u6319\u3059\u308b"},"content":{"rendered":"<p>\u4eca\u56de\u306fTTS\u30a8\u30f3\u30b8\u30f3\u306e\u5404\u7a2e\u60c5\u5831\u3092\u5217\u6319\u3059\u308b\u30de\u30af\u30ed\u3092\u7d39\u4ecb\u3057\u307e\u3059\u3002<br \/>\nMicrosoft Speech Platform\u304c\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3055\u308c\u3066\u3044\u306a\u3044\u5834\u5408\u306fSAPI\u304b\u3089\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3092\u53d6\u5f97\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"brush: vb; title: ; notranslate\" title=\"\">Option Explicit\r\n\r\nPublic Sub Sample()\r\n  Dim sv As Object\r\n  Dim st As Object\r\n  \r\n  Set sv = CreateSpVoice\r\n  If sv Is Nothing Then Exit Sub\r\n  On Error Resume Next\r\n  For Each st In sv.GetVoices\r\n    Debug.Print &quot;--------------------&quot;\r\n    Debug.Print &quot;ID:&quot; &amp; st.id\r\n    Debug.Print &quot;Name:&quot; &amp; st.GetAttribute(&quot;Name&quot;)\r\n    Debug.Print &quot;Language:&quot; &amp; st.GetAttribute(&quot;Language&quot;)\r\n    Debug.Print &quot;Gender:&quot; &amp; st.GetAttribute(&quot;Gender&quot;)\r\n    Debug.Print &quot;Age:&quot; &amp; st.GetAttribute(&quot;Age&quot;)\r\n    Debug.Print &quot;Vendor:&quot; &amp; st.GetAttribute(&quot;Vendor&quot;)\r\n    Debug.Print &quot;--------------------&quot;\r\n  Next\r\n  On Error GoTo 0\r\n  Set sv = Nothing\r\nEnd Sub\r\n\r\nPrivate Function CreateSpVoice() As Object\r\n  Dim sv As Object\r\n\r\n  Set sv = Nothing '\u521d\u671f\u5316\r\n  On Error Resume Next\r\n  Set sv = CreateObject(&quot;Speech.SpVoice&quot;)\r\n  If Err.Number &lt;&gt; 0 Then\r\n    Set sv = CreateObject(&quot;SAPI.SpVoice&quot;)\r\n    Err.Clear\r\n  End If\r\n  On Error GoTo 0\r\n  Set CreateSpVoice = sv\r\nEnd Function<\/pre>\n","protected":false},"excerpt":{"rendered":"\u4eca\u56de\u306fTTS\u30a8\u30f3\u30b8\u30f3\u306e\u5404\u7a2e\u60c5\u5831\u3092\u5217\u6319\u3059\u308b\u30de\u30af\u30ed\u3092\u7d39\u4ecb\u3057\u307e\u3059\u3002 Microsoft Speech Platform\u304c\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3055\u308c\u3066\u3044\u306a\u3044\u5834\u5408\u306fSAPI\u304b\u3089\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3092\u53d6\u5f97\u3057\u307e\u3059\u3002 Option Explicit Pu [&hellip;]","protected":false},"author":1,"featured_media":7111,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[4,48,49],"tags":[8,21],"class_list":["post-297","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-office","category-excel-office","category-word-office","tag-vba","tag-microsoft-speech-platform"],"aioseo_notices":[],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"https:\/\/www.ka-net.org\/blog\/wp-content\/uploads\/eyecatch-Excel.png","jetpack_shortlink":"https:\/\/wp.me\/p4UZZr-4N","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.ka-net.org\/blog\/index.php?rest_route=\/wp\/v2\/posts\/297","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.ka-net.org\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.ka-net.org\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.ka-net.org\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.ka-net.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=297"}],"version-history":[{"count":4,"href":"https:\/\/www.ka-net.org\/blog\/index.php?rest_route=\/wp\/v2\/posts\/297\/revisions"}],"predecessor-version":[{"id":1257,"href":"https:\/\/www.ka-net.org\/blog\/index.php?rest_route=\/wp\/v2\/posts\/297\/revisions\/1257"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.ka-net.org\/blog\/index.php?rest_route=\/wp\/v2\/media\/7111"}],"wp:attachment":[{"href":"https:\/\/www.ka-net.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=297"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.ka-net.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=297"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.ka-net.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=297"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}