version 15 with fixes for yes no and short speech
This commit is contained in:
@@ -6,12 +6,13 @@
|
||||
|
||||
This is the production-oriented path for restoring device connectivity and creating a foundation for future runtime, AI, and OTA work.
|
||||
|
||||
Current spoken cloud version: `Open Jibo Cloud version 1.0.14.`
|
||||
Current spoken cloud version: `Open Jibo Cloud version 1.0.15.`
|
||||
|
||||
Release hygiene reminder:
|
||||
|
||||
- bump [OpenJiboCloudBuildInfo.cs](/C:/Projects/JiboExperiments/OpenJibo/src/Jibo.Cloud/dotnet/src/Jibo.Cloud.Application/Services/OpenJiboCloudBuildInfo.cs) whenever we ship a meaningful hosted-cloud update
|
||||
- keep the spoken version response and `/health` version field aligned from that single source of truth
|
||||
- the API startup log now prints the same version on boot, which is useful for confirming the running build during live robot tests
|
||||
|
||||
## Architecture
|
||||
|
||||
|
||||
@@ -11,6 +11,8 @@ builder.Services.AddOpenJiboCloud(builder.Configuration);
|
||||
|
||||
var app = builder.Build();
|
||||
|
||||
app.Logger.LogInformation("Starting Open Jibo Cloud Api version {Version}", OpenJiboCloudBuildInfo.Version);
|
||||
|
||||
app.UseWebSockets();
|
||||
|
||||
app.Use(async (context, next) =>
|
||||
|
||||
@@ -2,7 +2,7 @@ namespace Jibo.Cloud.Application.Services;
|
||||
|
||||
public static class OpenJiboCloudBuildInfo
|
||||
{
|
||||
public const string Version = "1.0.14";
|
||||
public const string Version = "1.0.15";
|
||||
|
||||
public static string VersionWords => Version.Replace(".", " dot ");
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@ public sealed class WebSocketTurnFinalizationService(
|
||||
)
|
||||
{
|
||||
private const int AutoFinalizeMinBufferedAudioBytes = 12000;
|
||||
private const int AutoFinalizeMinBufferedAudioChunks = 5;
|
||||
private const int AutoFinalizeMinBufferedAudioChunks = 4;
|
||||
private static readonly TimeSpan AutoFinalizeMinTurnAge = TimeSpan.FromMilliseconds(1400);
|
||||
|
||||
public void ObserveIncomingMessage(CloudSession session, string? text)
|
||||
@@ -69,23 +69,7 @@ public sealed class WebSocketTurnFinalizationService(
|
||||
return await FinalizeTurnAsync(session, envelope, "AUTO_FINALIZE", allowFallbackOnMissingTranscript: true, cancellationToken);
|
||||
}
|
||||
|
||||
return
|
||||
[
|
||||
new WebSocketReply
|
||||
{
|
||||
Text = JsonSerializer.Serialize(new
|
||||
{
|
||||
type = "OPENJIBO_AUDIO_RECEIVED",
|
||||
data = new
|
||||
{
|
||||
bytes = envelope.Binary?.Length ?? 0,
|
||||
bufferedBytes = turnState.BufferedAudioBytes,
|
||||
bufferedChunks = turnState.BufferedAudioChunkCount,
|
||||
sessionId = session.SessionId
|
||||
}
|
||||
})
|
||||
}
|
||||
];
|
||||
return [];
|
||||
}
|
||||
|
||||
public async Task<IReadOnlyList<WebSocketReply>> HandleContextAsync(
|
||||
@@ -638,11 +622,9 @@ public sealed class WebSocketTurnFinalizationService(
|
||||
? DateTimeOffset.UtcNow - turnState.FirstAudioReceivedUtc.Value
|
||||
: TimeSpan.Zero;
|
||||
return turnState.AwaitingTurnCompletion &&
|
||||
turnState is
|
||||
{
|
||||
SawListen: true, SawContext: true, BufferedAudioChunkCount: >= AutoFinalizeMinBufferedAudioChunks,
|
||||
BufferedAudioBytes: >= AutoFinalizeMinBufferedAudioBytes
|
||||
} &&
|
||||
turnState.SawListen &&
|
||||
turnState.BufferedAudioChunkCount >= AutoFinalizeMinBufferedAudioChunks &&
|
||||
turnState.BufferedAudioBytes >= AutoFinalizeMinBufferedAudioBytes &&
|
||||
turnAge >= AutoFinalizeMinTurnAge;
|
||||
}
|
||||
|
||||
|
||||
@@ -23,9 +23,7 @@
|
||||
},
|
||||
{
|
||||
"binary": [1, 2, 3, 4],
|
||||
"expectedReplyTypes": [
|
||||
"OPENJIBO_AUDIO_RECEIVED"
|
||||
]
|
||||
"expectedReplyTypes": []
|
||||
},
|
||||
{
|
||||
"text": {
|
||||
|
||||
@@ -36,9 +36,7 @@
|
||||
},
|
||||
{
|
||||
"binary": [1, 2, 3, 4, 5, 6],
|
||||
"expectedReplyTypes": [
|
||||
"OPENJIBO_AUDIO_RECEIVED"
|
||||
]
|
||||
"expectedReplyTypes": []
|
||||
},
|
||||
{
|
||||
"text": {
|
||||
|
||||
@@ -35,15 +35,11 @@
|
||||
},
|
||||
{
|
||||
"binary": [1, 2, 3],
|
||||
"expectedReplyTypes": [
|
||||
"OPENJIBO_AUDIO_RECEIVED"
|
||||
]
|
||||
"expectedReplyTypes": []
|
||||
},
|
||||
{
|
||||
"binary": [4, 5, 6, 7],
|
||||
"expectedReplyTypes": [
|
||||
"OPENJIBO_AUDIO_RECEIVED"
|
||||
]
|
||||
"expectedReplyTypes": []
|
||||
},
|
||||
{
|
||||
"text": {
|
||||
|
||||
Reference in New Issue
Block a user