Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -442,7 +442,6 @@
"depth": 0,
"source": "local",
"dependencies": {
"com.microsoft.mrtk.tts.windows": "1.0.4",
"org.mixedrealitytoolkit.core": "3.2.2"
}
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ PlayerSettings:
clonedFromGUID: c0afd0d1d80e3634a9dac47e8a0426ea
templatePackageId: [email protected]
templateDefaultScene: Assets/Scenes/SampleScene.unity
useCustomMainManifest: 1
useCustomMainManifest: 0
useCustomLauncherManifest: 0
useCustomMainGradleTemplate: 0
useCustomLauncherGradleManifest: 0
Expand Down Expand Up @@ -843,9 +843,9 @@ PlayerSettings:
metroPackageVersion: 3.0.0.0
metroCertificatePath: Assets/WSATestCertificate.pfx
metroCertificatePassword:
metroCertificateSubject: Microsoft
metroCertificateIssuer: Microsoft
metroCertificateNotAfter: 803769c0d5dfda01
metroCertificateSubject: Mixed Reality Toolkit Organization
metroCertificateIssuer: Mixed Reality Toolkit Organization
metroCertificateNotAfter: 00abfea1861cdd01
metroApplicationDescription: MRTK3 Sample
wsaImages: {}
metroTileShortName: MRTK3
Expand Down
2 changes: 1 addition & 1 deletion org.mixedrealitytoolkit.windowsspeech/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
### Changed

* Subsystems no longer register themselves on non-Windows platforms.
* Made the dependency on com.microsoft.mrtk.tts.windows optional.

### Fixed

* Updated dependencies to match Unity Asset Store packages. [PR #1054](https://github.com/MixedRealityToolkit/MixedRealityToolkit-Unity/pull/1054)
* com.microsoft.mrtk.tts.windows 1.0.4
* org.mixedrealitytoolkit.core 3.2.2

## [3.0.3] - 2024-04-17
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,11 @@
"name": "com.microsoft.mixedreality.openxr",
"expression": "1.5.0",
"define": "MSFT_OPENXR_1_5_0_OR_NEWER"
},
{
"name": "com.microsoft.mrtk.tts.windows",
"expression": "",
"define": "MSFT_TTS_WIN_PRESENT"
}
],
"noEngineReferences": false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,13 @@
// Licensed under the BSD 3-Clause

using MixedReality.Toolkit.Subsystems;
using System;
using System.Runtime.InteropServices;
using System.Threading.Tasks;
using System.Linq;
using UnityEngine;
using UnityEngine.Scripting;

#if WINDOWS_UWP
using Windows.Foundation;
using System;
using System.Linq;
using Windows.Media.SpeechSynthesis;
using Windows.Storage.Streams;
#endif // WINDOWS_UWP
Expand Down Expand Up @@ -41,7 +39,7 @@ static void Register()
// Fetch subsystem metadata from the attribute.
var cinfo = XRSubsystemHelpers.ConstructCinfo<WindowsTextToSpeechSubsystem, TextToSpeechSubsystemCinfo>();

if (!WindowsTextToSpeechSubsystem.Register(cinfo))
if (!Register(cinfo))
{
Debug.LogError($"Failed to register the {cinfo.Name} subsystem.");
}
Expand Down Expand Up @@ -72,6 +70,7 @@ public override void Start()
#endif
}

/// <inheritdoc/>
public override void Destroy()
{
#if WINDOWS_UWP
Expand All @@ -85,7 +84,7 @@ public override void Destroy()

#region ITextToSpeechSubsystem implementation

#if !(WINDOWS_UWP || UNITY_STANDALONE_WIN || UNITY_EDITOR_WIN)
#if !(WINDOWS_UWP || ((UNITY_STANDALONE_WIN || UNITY_EDITOR_WIN) && MSFT_TTS_WIN_PRESENT))
private bool haveLogged = false;
#endif

Expand Down Expand Up @@ -124,7 +123,7 @@ public override async Task<bool> TrySpeak(string phrase, AudioSource audioSource
sampleRate);

audioSource.Play();

return true;
}

Expand Down Expand Up @@ -186,17 +185,17 @@ private async Task<byte[]> Synthesize(string phrase)
}

return waveData;
#elif (UNITY_STANDALONE_WIN || UNITY_EDITOR_WIN)
return await Task<byte[]>.Run(() =>
#elif (UNITY_STANDALONE_WIN || UNITY_EDITOR_WIN) && MSFT_TTS_WIN_PRESENT
return await Task.Run(() =>
{
if (!Microsoft.MixedReality.Toolkit.Speech.Windows.WinRTTextToSpeechPInvokes.TrySynthesizePhraseWithCustomVoice(phrase, config.VoiceName, out IntPtr nativeData, out int length))
if (!Microsoft.MixedReality.Toolkit.Speech.Windows.WinRTTextToSpeechPInvokes.TrySynthesizePhraseWithCustomVoice(phrase, config.VoiceName, out System.IntPtr nativeData, out int length))
{
Debug.LogError("Failed to synthesize the phrase");
return null;
}

byte[] waveData = new byte[length];
Marshal.Copy(nativeData, waveData, 0, length);
System.Runtime.InteropServices.Marshal.Copy(nativeData, waveData, 0, length);
// We can safely free the native data.
Microsoft.MixedReality.Toolkit.Speech.Windows.WinRTTextToSpeechPInvokes.FreeSynthesizedData(nativeData);

Expand Down
3 changes: 1 addition & 2 deletions org.mixedrealitytoolkit.windowsspeech/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "org.mixedrealitytoolkit.windowsspeech",
"version": "3.0.4-development",
"version": "3.1.0-development",
"description": "Speech subsystem implementation for native Windows speech APIs enables native Windows text-to-speech and speech recognition features, producing events to drive XRI interactions using speech.",
"displayName": "MRTK Windows Speech",
"msftFeatureCategory": "MRTK3",
Expand All @@ -17,7 +17,6 @@
"unityRelease": "26f1",
"documentationUrl": "https://www.mixedrealitytoolkit.org",
"dependencies": {
"com.microsoft.mrtk.tts.windows": "1.0.4",
"org.mixedrealitytoolkit.core": "3.2.2"
}
}