Search
 
SCRIPT & CODE EXAMPLE
 

CSHARP

C# Rev.ai transcription

using System;
using System.Net.Http;
using System.Threading.Tasks;
using System.Text;
using Newtonsoft.Json.Linq;

public class Program
{
  public static async Task Main(string[] args)
  {
    using (var client = new HttpClient())
    {
      client.DefaultRequestHeaders.Add("Authorization", "Bearer <YOUR_TOKEN_HERE>");
      JObject json = JObject.Parse(@"{
        metadata: 'example metadata',
        notification_config: {
          url: 'https://www.example.com/callback',
          auth_headers: {
            Authorization: 'Bearer <notification-url-token>'
          }
        },
        source_config: {
          url: 'https://www.rev.ai/FTC_Sample_1.mp3',
          auth_headers: {
            Authorization: 'Bearer <source-url-token>'
          }
        },
        transcriber: 'machine',
        skip_diarization: false,
        skip_punctuation: false,
        remove_disfluencies: false,
        filter_profanity: false,
        speaker_channel_count: 1,
        delete_after_seconds: 2592000,
        custom_vocabulary_id: 'cvgnDwmB6iXevn',
        language: 'en'
      }");
      var postData = new StringContent(json.ToString(), Encoding.UTF8, "application/json");
      var request = await client.PostAsync("https://api.rev.ai/speechtotext/v1/jobs", postData);
      var response = await request.Content.ReadAsStringAsync();

      Console.WriteLine(response);
    }
  }
}
Comment

PREVIOUS NEXT
Code Example
Csharp :: CS0234 compile error c# unity fix scene managment 
Csharp :: c# single comment 
Csharp :: asp.net core web api Microsoft.Data.SqlClient.SqlException (0x80131904): 
Csharp :: how to do if statement based on date in asp net c# 
Csharp :: return a list of list from yaml via C# 
Csharp :: c# i++ meaning 
Csharp :: c# remove exit icon 
Csharp :: dictionary and generic class c# 
Csharp :: username and password into base64 encoding c# 
Csharp :: block wapalyzer from detecting codeigniter 
Csharp :: custom player spawner mirror 
Csharp :: c sharp tenery operator on an action 
Csharp :: nest elasticsearch date reange c# .net 
Csharp :: c sharp switch forms 
Csharp :: c# excel fix first row 
Csharp :: ########## 
Csharp :: C# if with obj params 
Csharp :: httprequestmessage with authorization .net 5 
Csharp :: credit card validation in c# 
Csharp :: player not following slide object unity 2d 
Csharp :: c# how to convert string to float 
Csharp :: permutation and combination program in c# 
Csharp :: check that IEnumerable is not empty 
Csharp :: c# sha512 salt 
Csharp :: query to linq converter online 
Csharp :: asp.net framework mvc cors error axios 
Csharp :: ExpandoObject Syntax that Compile 
Csharp :: reversing linkedlist C# 
Csharp :: If this is a Windows (R) Communication Foundation service to which you have access, please check that you have enabled metadata publishing at the specified address. 
Csharp :: Program to find GCD or HCF of two numbers c# 
ADD CONTENT
Topic
Content
Source link
Name
8+9 =