{"id":280,"date":"2021-05-18T09:42:10","date_gmt":"2021-05-18T08:42:10","guid":{"rendered":"http:\/\/blog.c-hase.de\/?p=280"},"modified":"2021-05-18T09:42:10","modified_gmt":"2021-05-18T08:42:10","slug":"audio-in-iis-aktivieren","status":"publish","type":"post","link":"http:\/\/blog.c-hase.de\/?p=280","title":{"rendered":"audio in iis aktivieren"},"content":{"rendered":"<h4>System.Speech throws \u201cNo voice installed on the system or none available with the current security setting\u201d exception in Windows Service<\/h4>\n<p>&nbsp;<\/p>\n<div class=\"featurebox_center_content\">\n<pre>Long time reader, first time poster.\r\nI'm developing a Windows Service in C# .Net 3.5 to perform Text to Speech operations.\r\nI'm using System.Speech (Microsoft Speech API 3.x).\r\nI deployed the service to a Win2008 x64 server and it's now throwing the following exception:\r\nSystem.InvalidOperationException: No voice installed on the system or none available with the current security setting.\r\nat System.Speech.Internal.Synthesis.VoiceSynthesis.Speak(Prompt prompt)\r\nat System.Speech.Synthesis.SpeechSynthesizer.Speak(Prompt prompt)\r\nat System.Speech.Synthesis.SpeechSynthesizer.Speak(String textToSpeak)\r\nThe service is running under a domain account. If I change the service to run under my own personal domain account (which has pretty high privileges), everything works perfectly (so a voice [Anna] is definitely installed). So I'm quite certain it's a security issue.\r\nWhat permissions\/modifications do I need to make to the other domain account to make this work?\r\nAnd it needs to be this specific user because it's used for Windows auth for a MSSQL database.\r\nThanks in advance.\r\n<\/pre>\n<\/div>\n<div class=\"featurebox_center_content\">\n<pre>Simple fix: Grant read\/write access to C:\\windows\\system32\\config\\systemprofile\\appdata\\roaming for the same user that the service is running under.\r\n<\/pre>\n<\/div>\n<div class=\"featurebox_center_content\">\n<pre>In x64 OS, this is caused by AnyCPU build configuration. Switch to x86 build configuration and it should work.\r\n<\/pre>\n<\/div>\n<div class=\"featurebox_center_content\">\n<pre>i exited Visual Studio and reopened it after it saved, and the problem was solved.\r\n<\/pre>\n<\/div>\n<div class=\"featurebox_center_content\">\n<pre>Simply, run the app as \"administrator\". ;)\r\n\r\n<a href=\"https:\/\/csharp.wekeepcoding.com\/article\/19866074\/System.Speech+throws+%E2%80%9CNo+voice+installed+on+the+system+or+none+available+with+the+current+security+setting%E2%80%9D+exception+in+Windows+Service\">https:\/\/csharp.wekeepcoding.com\/article\/19866074\/System.Speech+throws+%E2%80%9CNo+voice+installed+on+the+system+or+none+available+with+the+current+security+setting%E2%80%9D+exception+in+Windows+Service<\/a><\/pre>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>System.Speech throws \u201cNo voice installed on the system or none available with the current security setting\u201d exception in Windows Service &nbsp; Long time reader, first time poster. I&#8217;m developing a Windows Service in C# .Net 3.5 to perform Text to &hellip; <a href=\"http:\/\/blog.c-hase.de\/?p=280\">Weiterlesen <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8],"tags":[],"class_list":["post-280","post","type-post","status-publish","format-standard","hentry","category-c"],"_links":{"self":[{"href":"http:\/\/blog.c-hase.de\/index.php?rest_route=\/wp\/v2\/posts\/280","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/blog.c-hase.de\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/blog.c-hase.de\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/blog.c-hase.de\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/blog.c-hase.de\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=280"}],"version-history":[{"count":2,"href":"http:\/\/blog.c-hase.de\/index.php?rest_route=\/wp\/v2\/posts\/280\/revisions"}],"predecessor-version":[{"id":282,"href":"http:\/\/blog.c-hase.de\/index.php?rest_route=\/wp\/v2\/posts\/280\/revisions\/282"}],"wp:attachment":[{"href":"http:\/\/blog.c-hase.de\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=280"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/blog.c-hase.de\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=280"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/blog.c-hase.de\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=280"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}