refactors
This commit is contained in:
@@ -4,15 +4,11 @@ namespace Playground;
|
||||
|
||||
public sealed class AsrEvent
|
||||
{
|
||||
[JsonPropertyName("event_type")]
|
||||
public string? EventType { get; set; }
|
||||
[JsonPropertyName("event_type")] public string? EventType { get; set; }
|
||||
|
||||
[JsonPropertyName("task_id")]
|
||||
public string? TaskId { get; set; }
|
||||
[JsonPropertyName("task_id")] public string? TaskId { get; set; }
|
||||
|
||||
[JsonPropertyName("request_id")]
|
||||
public string? RequestId { get; set; }
|
||||
[JsonPropertyName("request_id")] public string? RequestId { get; set; }
|
||||
|
||||
[JsonPropertyName("utterances")]
|
||||
public List<AsrUtterance>? Utterances { get; set; }
|
||||
[JsonPropertyName("utterances")] public List<AsrUtterance>? Utterances { get; set; }
|
||||
}
|
||||
@@ -4,9 +4,7 @@ namespace Playground;
|
||||
|
||||
public sealed class AsrUtterance
|
||||
{
|
||||
[JsonPropertyName("utterance")]
|
||||
public string? Utterance { get; set; }
|
||||
[JsonPropertyName("utterance")] public string? Utterance { get; set; }
|
||||
|
||||
[JsonPropertyName("score")]
|
||||
public double Score { get; set; }
|
||||
[JsonPropertyName("score")] public double Score { get; set; }
|
||||
}
|
||||
@@ -62,8 +62,7 @@ while (!cts.IsCancellationRequested)
|
||||
}
|
||||
|
||||
ms.Write(buffer, 0, result.Count);
|
||||
}
|
||||
while (!result.EndOfMessage);
|
||||
} while (!result.EndOfMessage);
|
||||
|
||||
var json = Encoding.UTF8.GetString(ms.ToArray());
|
||||
|
||||
|
||||
Reference in New Issue
Block a user