コード例 #1
0
 protected override void HandleDownstreamVirtualCompanionExecutionContext(IVirtualCompanionExecutionContext context)
 {
     if (context.TryGetAudioInputFeature("en", out var audio))
     {
         // convert audio to text
         context.AddTextInputFeature("en", "Hello World");
     }
 }
        public static bool TryGetAudioInputFeature(this IVirtualCompanionExecutionContext context, string culture, out byte[] buffer)
        {
            var cultureInfo = CultureInfo.GetCultureInfo(culture);

            return(context.TryGetAudioInputFeature(cultureInfo, out buffer));
        }