Make it easy to create DialogProcessor 64
- Add PostFormAsync<TResponse> to ChatdollHttp
- Add AnimatedVoiceRequest property to Response
- Create DialogProcessorBase.cs
This is the sample code of EchoDialog.
Csharp
using System.Threading;
using System.Threading.Tasks;
using ChatdollKit.Dialog;
public class EchoDialog : DialogProcessorBase
{
public override async Task<Response> ProcessAsync(Request request, Context context, CancellationToken token)
{
var response = new Response(request.Id);
// Echo
response.AnimatedVoiceRequest.AddVoiceTTS(request.Text);
return response;
}
}
Improve usage of Web/TTS VoiceLoader 65
- Change the way to initialize and register Web/TTS VoiceLoaders
- Fix bug that TTSpeech engine is not selected properly in prefetching
You don't need to create instances of VoiceLoaders any more. Just append them to 3D model and configure it on inspector.
Note: Set true to `IsDefault` to use the loader as the Default TTS voice loader.
Add in-memory context store and set it as the default of Chatdoll 66
In many cases user expects that the context is cleared when the application is shutdown.
Make it easy to build app with message window
- Change namespace of SimpleMessageWindow to ChatdollKit.Dialog 67
- Add default Start/Finish listening action with SimpleMessageWindow 68
Message window will be automatically shown by setting `SimpleMessageWindow` to `MessageWindow` on inspector of subclasses of `VoiceRequestProviderBase`.
Of course you can also fully customize `OnStartListening` and `OnFinishListening` as ever.