{"id":16479,"date":"2025-07-02T19:38:06","date_gmt":"2025-07-02T17:38:06","guid":{"rendered":"https:\/\/www.beseit.net\/?p=16479"},"modified":"2025-07-02T20:16:14","modified_gmt":"2025-07-02T18:16:14","slug":"installa-veus-onecore-ps1","status":"publish","type":"post","link":"http:\/\/www.beseit.net\/?p=16479","title":{"rendered":"instal\u00b7la-veus-onecore.ps1"},"content":{"rendered":"\n<pre class=\"wp-block-code\"><code># Lleng\u00fces que vols instal\u00b7lar\n$Languages = @(\"ca-ES\", \"es-ES\", \"en-US\", \"en-GB\", \"fr-FR\")\n\n# Components de veu i reconeixement per a cada llengua\n$CapabilitiesBase = @(\n  \"Language.Basic~~~{0}~0.0.1.0\",\n  \"Language.Handwriting~~~{0}~0.0.1.0\",\n  \"Language.Speech~~~{0}~0.0.1.0\",\n  \"Language.TextToSpeech~~~{0}~0.0.1.0\"\n)\n\nforeach ($lang in $Languages) {\n    Write-Host \"? Processant idioma: $lang\" -ForegroundColor Cyan\n    foreach ($capTemplate in $CapabilitiesBase) {\n        $cap = &#91;string]::Format($capTemplate, $lang)\n        $capState = Get-WindowsCapability -Online -Name $cap -ErrorAction SilentlyContinue\n\n        if ($capState -and $capState.State -eq \"Installed\") {\n            Write-Host \"\u2705 Ja instal\u00b7lat: $cap\" -ForegroundColor Green\n        }\n        else {\n            Write-Host \"? Instal\u00b7lant: $cap\" -ForegroundColor Yellow\n            try {\n                Add-WindowsCapability -Online -Name $cap -ErrorAction Stop\n                Write-Host \"\u2705 Instal\u00b7lat correctament: $cap\" -ForegroundColor Green\n            } catch {\n                Write-Host \"\u274c Error instal\u00b7lant $cap: $_\" -ForegroundColor Red\n            }\n        }\n    }\n    Write-Host \"----------------------------`n\"\n}\n\nWrite-Host \"? Quan acabi TOT, reinicia Windows manualment per activar les veus.\" -ForegroundColor Magenta\n<\/code><\/pre>\n\n\n\n<p><code>es-ES<\/code> (Espanyol)<\/p>\n\n\n\n<p><code>en-US<\/code> (Angl\u00e8s EUA)<\/p>\n\n\n\n<p><code>en-GB<\/code> (Angl\u00e8s UK)<\/p>\n\n\n\n<p><code>fr-FR<\/code> (Franc\u00e8s)<\/p>\n\n\n\n<p><code>ca-ES<\/code> (Catal\u00e0)<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">? Com usar-lo<\/h2>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Desa el contingut anterior com a fitxer:\n<ul class=\"wp-block-list\">\n<li>Exemple: <code>C:\\tts\\instal\u00b7la-veus-onecore.ps1<\/code><\/li>\n<\/ul>\n<\/li>\n\n\n\n<li>Obre <strong>PowerShell com a administrador<\/strong><\/li>\n\n\n\n<li>Executa:<\/li>\n<\/ol>\n\n\n\n<pre class=\"wp-block-code\"><code>Set-ExecutionPolicy -Scope Process -ExecutionPolicy Bypass\nC:\\tts\\instal\u00b7la-veus-onecore.ps1\n<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">? Despr\u00e9s de c\u00f3rrer-lo<\/h2>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong>Reinicia l\u2019ordinador<\/strong><\/li>\n\n\n\n<li>Executa el teu script Python de detecci\u00f3 (<code>Speech_OneCore<\/code>) per veure les veus noves<\/li>\n\n\n\n<li>Ja podr\u00e0s usar-les via Python o integraci\u00f3 a la web<\/li>\n<\/ol>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n","protected":false},"excerpt":{"rendered":"<p>es-ES (Espanyol) en-US (Angl\u00e8s EUA) en-GB (Angl\u00e8s UK) fr-FR (Franc\u00e8s) ca-ES (Catal\u00e0) ? Com usar-lo ? Despr\u00e9s de c\u00f3rrer-lo<\/p>\n","protected":false},"author":2,"featured_media":3169,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[185],"tags":[],"class_list":["post-16479","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-veus"],"_links":{"self":[{"href":"http:\/\/www.beseit.net\/index.php?rest_route=\/wp\/v2\/posts\/16479","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.beseit.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.beseit.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.beseit.net\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"http:\/\/www.beseit.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=16479"}],"version-history":[{"count":5,"href":"http:\/\/www.beseit.net\/index.php?rest_route=\/wp\/v2\/posts\/16479\/revisions"}],"predecessor-version":[{"id":16486,"href":"http:\/\/www.beseit.net\/index.php?rest_route=\/wp\/v2\/posts\/16479\/revisions\/16486"}],"wp:featuredmedia":[{"embeddable":true,"href":"http:\/\/www.beseit.net\/index.php?rest_route=\/wp\/v2\/media\/3169"}],"wp:attachment":[{"href":"http:\/\/www.beseit.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=16479"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.beseit.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=16479"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.beseit.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=16479"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}