コード例 #1
0
ファイル: Conference.cs プロジェクト: troft/csharp-bandwidth
 /// <summary>
 ///   Play audio file by url
 /// </summary>
 /// <param name="instance">>Instance of <see cref="IPlayAudio" /></param>
 /// <param name="conferenceId">Id of the conference</param>
 /// <param name="memberId">Id of the member to play audio</param>
 /// <param name="fileUrl">Url to file to play</param>
 /// <param name="tag">A string that will be included in the events delivered when the audio playback starts or finishes</param>
 /// <param name="cancellationToken">
 ///   Optional token to cancel async operation
 /// </param>
 /// <returns>Task instance for async operation</returns>
 /// <example>
 ///   <code>
 /// await client.Conference.PlayAudioFileToMemberAsync("conferenceId", "memberId, "http://host/path/to/file.mp3");
 /// </code>
 /// </example>
 public static Task PlayAudioFileToMemberAsync(this IConference instance, string conferenceId, string memberId,
                                               string fileUrl, string tag          = null,
                                               CancellationToken?cancellationToken = null)
 {
     return(instance.PlayAudioToMemberAsync(conferenceId, memberId, new PlayAudioData
     {
         FileUrl = fileUrl,
         Tag = tag
     }, cancellationToken));
 }
コード例 #2
0
ファイル: Conference.cs プロジェクト: troft/csharp-bandwidth
 /// <summary>
 ///   Speak a sentence
 /// </summary>
 /// <param name="instance">Instance of <see cref="IPlayAudio" /></param>
 /// <param name="conferenceId">Id of the conference</param>
 /// <param name="memberId">Id of the member to play audio</param>
 /// <param name="sentence">The sentence to speak</param>
 /// <param name="gender">The gender of the voice used to synthesize the sentence.</param>
 /// <param name="voice">The voice to speak the sentence.</param>
 /// <param name="locale">The locale used to get the accent of the voice used to synthesize the sentence.</param>
 /// <param name="tag">A string that will be included in the events delivered when the audio playback starts or finishes</param>
 /// <param name="cancellationToken">
 ///   Optional token to cancel async operation
 /// </param>
 /// <returns>Task instance for async operation</returns>
 /// <example>
 ///   <code>
 /// await client.Conference.SpeakSentenceToMemberAsync("conferenceId", "memberId, "Hello");
 /// </code>
 /// </example>
 public static Task SpeakSentenceToMemberAsync(this IConference instance, string conferenceId, string memberId,
                                               string sentence, Gender gender = Gender.Female,
                                               string voice = "susan", string locale = "en_US", string tag = null,
                                               CancellationToken?cancellationToken = null)
 {
     return(instance.PlayAudioToMemberAsync(conferenceId, memberId, new PlayAudioData
     {
         Sentence = sentence,
         Gender = gender,
         Voice = voice,
         Locale = locale,
         Tag = tag
     }, cancellationToken));
 }