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
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() |
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
self?.symblAI.transcript(for: upload, { transcript in | |
print(transcript) | |
}) |
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
self?.symblAI.status(for: upload) { status in | |
print(status) | |
} |
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
// start uploading to symbl.ai | |
symblAI.upload(sound) { result in | |
switch result { | |
case .success(let upload): | |
print(upload) | |
case .failure(let error): | |
print(error) | |
} | |
} |
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
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() |
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
// | |
// SymblAI.swift | |
// APIExample | |
// | |
// Created by Shams Ahmed on 29/03/2021. | |
// Copyright © 2021 Agora Corp. All rights reserved. | |
// | |
import Foundation | |
import Combine |
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
// | |
// Audio.swift | |
// APIExample | |
// | |
// Created by Shams Ahmed on 29/03/2021. | |
// Copyright © 2021 Agora Corp. All rights reserved. | |
// | |
import CoreAudio | |
import AVKit |
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
[ | |
{ | |
"action": "connect", | |
"from": "447418340557", | |
"endpoint": [ | |
{ | |
"type": "app", | |
"user": "shams" | |
} | |
] |
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
[ | |
{ | |
"action": "connect", | |
"from": "447418340557", | |
"endpoint": [ | |
{ | |
"type": "app", | |
"user": "ios" | |
} | |
] |
NewerOlder