This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const revai = require('revai-node-sdk'); | |
const fs = require('fs'); | |
var client = new revai.RevAiStreamingClient(YOUR-ACCESS-TOKEN, YOUR-AUDIO-CONFIG); | |
client.on('close', (code, reason) => { console.log(`Connection closed, ${code}: ${reason}`); }); | |
client.on('httpResponse', code => { console.log(`Streaming client received http response with code: ${code}`); }); | |
client.on('connectFailed', error => { console.log(`Connection failed with error: ${error}`); }); | |
client.on('connect', connectionMessage => { console.log(`Connected with message: ${connectionMessage}`); }); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from rev_ai.models import MediaConfig | |
from rev_ai.streamingclient import RevAiStreamingClient | |
import io | |
config = MediaConfig(YOUR MEDIA CONTENT TYPE) | |
streamclient = RevAiStreamingClient(YOUR ACCESS TOKEN, config) | |
with io.open(YOUR FILE, 'rb') as stream: | |
MEDIA_GENERATOR = [stream.read()] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# import rev_ai and create your client using your access token. | |
from rev_ai import apiclient | |
client = apiclient.RevAiAPIClient("ACCESS_TOKEN") | |
# send an audio file to rev.ai | |
job = client.send_job_url("rev.cm/FTC_Sample_1_-_Single") | |
# retrieve your transcript | |
client.get_transcript_json(job.id) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Send an audio file to Rev.ai | |
curl -X POST "https://api.rev.ai/revspeech/v1beta/jobs" | |
-H "Authorization: Bearer <access_token>" | |
-H "Content-Type: application/json" | |
-d "{\"media_url\":\"rev.cm/FTC_Sample_1_-_Single"}" | |
// Retrieve your transcript | |
curl -X GET "https://api.rev.ai/revspeech/v1beta/jobs/{id}/transcript" | |
-H "Authorization: Bearer <access_token>" | |
-H "Accept: application/vnd.rev.transcript.v1.0+json" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package abc.parser; | |
import java.util.ArrayList; | |
import java.util.Arrays; | |
import java.util.HashMap; | |
import java.util.List; | |
import java.util.Map; | |
import abc.sound.Chord; | |
import abc.sound.EmptyVoice; |