Raised amount of tries before timeout, convert wav to ogg
This commit is contained in:
@@ -115,7 +115,7 @@ public sealed class TTSSystem : EntitySystem
|
|||||||
private bool TryCreateAudioSource(byte[] data, [NotNullWhen(true)] out IAudioSource? source)
|
private bool TryCreateAudioSource(byte[] data, [NotNullWhen(true)] out IAudioSource? source)
|
||||||
{
|
{
|
||||||
var dataStream = new MemoryStream(data) { Position = 0 };
|
var dataStream = new MemoryStream(data) { Position = 0 };
|
||||||
var audioStream = _audioSystem.LoadAudioWav(dataStream);
|
var audioStream = _audioSystem.LoadAudioOggVorbis(dataStream);
|
||||||
source = _audioSystem.CreateAudioSource(audioStream);
|
source = _audioSystem.CreateAudioSource(audioStream);
|
||||||
if (source == null)
|
if (source == null)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ public sealed class TTSManager
|
|||||||
new HistogramConfiguration()
|
new HistogramConfiguration()
|
||||||
{
|
{
|
||||||
LabelNames = new[] {"type"},
|
LabelNames = new[] {"type"},
|
||||||
Buckets = Histogram.ExponentialBuckets(.1, 1.5, 10),
|
Buckets = Histogram.ExponentialBuckets(.1, 1.5, 100),
|
||||||
});
|
});
|
||||||
|
|
||||||
private static readonly Counter WantedCount = Metrics.CreateCounter(
|
private static readonly Counter WantedCount = Metrics.CreateCounter(
|
||||||
@@ -130,6 +130,7 @@ public sealed class TTSManager
|
|||||||
query["text"] = body.Text;
|
query["text"] = body.Text;
|
||||||
query["pitch"] = body.Pitch;
|
query["pitch"] = body.Pitch;
|
||||||
query["rate"] = body.Rate;
|
query["rate"] = body.Rate;
|
||||||
|
query["ogg"] = "1";
|
||||||
query["file"] = "1";
|
query["file"] = "1";
|
||||||
uriBuilder.Query = query.ToString();
|
uriBuilder.Query = query.ToString();
|
||||||
return uriBuilder.ToString();
|
return uriBuilder.ToString();
|
||||||
|
|||||||
Reference in New Issue
Block a user