diff --git a/.gitmodules b/.gitmodules
index b763b31..0eb3bb3 100644
--- a/.gitmodules
+++ b/.gitmodules
@@ -4,3 +4,6 @@
[submodule "YMM4-GitHubUpdateNotifier"]
path = YMM4-GitHubUpdateNotifier
url = https://github.com/routersys/YMM4-GitHubUpdateNotifier.git
+[submodule "YMM4-Telemetry"]
+ path = YMM4-Telemetry
+ url = https://github.com/routersys/YMM4-Telemetry.git
diff --git a/UTAU/UTAU.csproj b/UTAU/UTAU.csproj
index 0cca76d..bdfd005 100644
--- a/UTAU/UTAU.csproj
+++ b/UTAU/UTAU.csproj
@@ -77,6 +77,8 @@
+
+
diff --git a/UTAU/UTAUVoicePlugin.cs b/UTAU/UTAUVoicePlugin.cs
index e8c5b72..d64da99 100644
--- a/UTAU/UTAUVoicePlugin.cs
+++ b/UTAU/UTAUVoicePlugin.cs
@@ -1,3 +1,4 @@
+using Telemetry;
using UTAU.Models;
using YukkuriMovieMaker.Plugin;
using YukkuriMovieMaker.Plugin.Voice;
@@ -18,16 +19,30 @@ internal sealed class UTAUVoicePlugin : IVoicePlugin
public bool IsVoicesCached => VoiceBankRepository.IsLoaded;
- public Task UpdateVoicesAsync() => Task.Run(VoiceBankRepository.Reload);
+ public Task UpdateVoicesAsync() => Task.Run(Reload);
static IEnumerable GetVoices()
{
+ TelemetryReporter.Start();
UTAUUpdateNotifier.EnsureCheckedOnce();
if (!VoiceBankRepository.IsLoaded)
- VoiceBankRepository.Reload();
+ Reload();
foreach (var bank in VoiceBankRepository.Banks)
yield return new UTAUVoiceSpeaker(bank);
}
+
+ static void Reload()
+ {
+ try
+ {
+ VoiceBankRepository.Reload();
+ }
+ catch (Exception exception)
+ {
+ TelemetryReporter.Report(exception);
+ throw;
+ }
+ }
}
diff --git a/UTAU/UTAUVoiceSpeaker.cs b/UTAU/UTAUVoiceSpeaker.cs
index 0693474..a4bdd0b 100644
--- a/UTAU/UTAUVoiceSpeaker.cs
+++ b/UTAU/UTAUVoiceSpeaker.cs
@@ -1,3 +1,4 @@
+using Telemetry;
using UTAU.Models;
using UTAU.Notes;
using UTAU.Phonemes;
@@ -48,6 +49,19 @@ internal sealed class UTAUVoiceSpeaker(VoiceBank bank) : IVoiceSpeaker
=> currentParameter is UTAUVoiceParameter ? currentParameter : CreateVoiceParameter();
public async Task CreateVoiceAsync(string text, IVoicePronounce? pronounce, IVoiceParameter? parameter, string filePath)
+ {
+ try
+ {
+ return await CreateAsync(text, pronounce, parameter, filePath).ConfigureAwait(false);
+ }
+ catch (Exception exception) when (exception is not InvalidOperationException)
+ {
+ TelemetryReporter.Report(exception);
+ throw;
+ }
+ }
+
+ async Task CreateAsync(string text, IVoicePronounce? pronounce, IVoiceParameter? parameter, string filePath)
{
var param = parameter as UTAUVoiceParameter ?? new UTAUVoiceParameter();
var isUst = UstSource.TryGetPath(text, out var ustPath);
diff --git a/UTAU/ViewModels/UTAUSettingsViewModel.cs b/UTAU/ViewModels/UTAUSettingsViewModel.cs
index a6e4a12..da40a37 100644
--- a/UTAU/ViewModels/UTAUSettingsViewModel.cs
+++ b/UTAU/ViewModels/UTAUSettingsViewModel.cs
@@ -1,6 +1,7 @@
using System.Collections.ObjectModel;
using System.IO;
using System.Windows.Input;
+using Telemetry;
using UTAU.Models;
using UTAU.Synthesis;
using YukkuriMovieMaker.Commons;
@@ -78,6 +79,7 @@ internal sealed class UTAUSettingsViewModel : Bindable
}
catch (Exception exception)
{
+ TelemetryReporter.Report(exception);
StatusText = exception.Message;
}
finally
diff --git a/YMM4-Telemetry b/YMM4-Telemetry
new file mode 160000
index 0000000..0401090
--- /dev/null
+++ b/YMM4-Telemetry
@@ -0,0 +1 @@
+Subproject commit 04010903ca3ad740c3d182cb861262252cb5fdf0