VoiceServiceRequestResults.cs 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. /*
  2. * Copyright (c) Meta Platforms, Inc. and affiliates.
  3. * All rights reserved.
  4. *
  5. * This source code is licensed under the license found in the
  6. * LICENSE file in the root directory of this source tree.
  7. */
  8. using Meta.Voice;
  9. using Meta.WitAi.Json;
  10. namespace Meta.WitAi.Requests
  11. {
  12. public class VoiceServiceRequestResults
  13. : INLPTextRequestResults, INLPAudioRequestResults
  14. {
  15. /// <summary>
  16. /// Request status code if applicable
  17. /// </summary>
  18. public int StatusCode { get; internal set; }
  19. /// <summary>
  20. /// Request cancelation/error message
  21. /// </summary>
  22. public string Message { get; private set; }
  23. /// <summary>
  24. /// Response transcription
  25. /// </summary>
  26. public string Transcription { get; internal set; }
  27. /// <summary>
  28. /// Response transcription
  29. /// </summary>
  30. public bool IsFinalTranscription { get; internal set; }
  31. /// <summary>
  32. /// Response transcription
  33. /// </summary>
  34. public string[] FinalTranscriptions { get; internal set; }
  35. /// <summary>
  36. /// Parsed json response data
  37. /// </summary>
  38. public WitResponseNode ResponseData { get; internal set; }
  39. /// <summary>
  40. /// Default constructor without message
  41. /// </summary>
  42. public VoiceServiceRequestResults()
  43. {
  44. Message = string.Empty;
  45. }
  46. /// <summary>
  47. /// Constructor with a specific message
  48. /// </summary>
  49. public VoiceServiceRequestResults(string newMessage)
  50. {
  51. Message = newMessage;
  52. }
  53. }
  54. }