Skip to content

Instantly share code, notes, and snippets.

View shams-ahmed's full-sized avatar
🌞

Shams Ahmed shams-ahmed

🌞
View GitHub Profile
[{
"action": "connect",
"from": "447418340557",
"endpoint": [
{"type": "phone", "number": "13331234486"}
]
}]
[
{
"action": "connect",
"from": "447700900000",
"timeout": 5,
"eventType": "rejected",
"eventUrl": [
"https://example.com/event-fallback"
],
"endpoint": [
[
{
"action": "connect",
"from": "447418340557",
"endpoint": [
{
"type": "app",
"user": "ios"
}
]
@shams-ahmed
shams-ahmed / connect_to_ios.json
Last active June 8, 2018 10:42
connect_to_ios
[
{
"action": "connect",
"from": "447418340557",
"endpoint": [
{
"type": "app",
"user": "shams"
}
]
@shams-ahmed
shams-ahmed / Audio.swift
Last active April 25, 2022 09:38
Symbl.ai: Audio class
//
// Audio.swift
// APIExample
//
// Created by Shams Ahmed on 29/03/2021.
// Copyright © 2021 Agora Corp. All rights reserved.
//
import CoreAudio
import AVKit
@shams-ahmed
shams-ahmed / SymblAI.swift
Created March 31, 2021 20:40
Symbl.ai: SymblAI class
//
// SymblAI.swift
// APIExample
//
// Created by Shams Ahmed on 29/03/2021.
// Copyright © 2021 Agora Corp. All rights reserved.
//
import Foundation
import Combine
@shams-ahmed
shams-ahmed / JoinChannelAudioEntry.swift
Created March 31, 2021 20:45
Symbl.ai: Recording audio on iOS
let audio = Audio()
let symblAI = SymblAI(with: "enter_token_here")
override func viewDidAppear(_ animated: Bool) {
super.viewDidAppear(animated)
// Stop audio recording if it has been started
if audio.isRunning {
do {
let sound = try audio.stop()
@shams-ahmed
shams-ahmed / JoinChannelAudioEntry.swift
Created March 31, 2021 20:50
Symbl.ai: Submitting the audio to Symbl.ai
// start uploading to symbl.ai
symblAI.upload(sound) { result in
switch result {
case .success(let upload):
print(upload)
case .failure(let error):
print(error)
}
}
@shams-ahmed
shams-ahmed / JoinChannelAudioEntry.swift
Created March 31, 2021 20:52
Symbl.ai: Validation the audio data on Symbl.ai
self?.symblAI.status(for: upload) { status in
print(status)
}
@shams-ahmed
shams-ahmed / JoinChannelAudioEntry.swift
Created March 31, 2021 20:55
Symbl.ai: Fetching the transcription from Symbl.ai
self?.symblAI.transcript(for: upload, { transcript in
print(transcript)
})