Twilio: test speaker/microphone - testing

Using Twilio, how can I create a JS widget that can listen to the microphone and output its sound through the speakers, as a loopback?

Twilio developer evangelist here.
I don't believe you need Twilio for that. You can just use the getUserMedia API to capture a user's microphone and then play it back with an HTML5 <audio> tag.
I'd like to recommend you don't do this though. Whilst building video chats and testing with myself, the feedback is horrible and no-one wants to experience it!

Related

How can I send audio data from a microphone to an API?

I would like to use an API that checks pronunciation. Its input is audio. I would like to achieve the following: the user speaks to the microphone - an audio file is generated - and it is sent to the API. The API sends back the answer - the evaluation of the pronunciation. How can achieve this?
I would be also interested in how to display the microphone for the users.
My main aim is to make it work in a browser.
Thank you very much for your answer.
I couldn't set up the audio recording yet.

Develop a web chat app using webrtc looking for any API for voice changing

I'm developing a web chat app using webrtc I want to know that can we change the voice of the user live calling in webrtc and is there any API for live call voice changer so let me know thanks
What you looking for is insertable streams api. It allows you to access the media stream and apply transformations to the stream.
Check out this example which applies low pass filter on the audio track. There's a link to code at the bottom of the page.

Twilio programmable video notifications

I developed a solution to allow my users to get in touch through video calls.
However, for iOS I can't manage to trigger notifications (CallKeep for example) to warn a user that someone is trying to contact him.
Would you have solutions to propose to me because I can't find anything conclusive.
Check out the Twilio Video quick start application has a CallKit example. Please take a look at that and see what you can learn.

How to get "mute" state of all users in the channel? [agora.io]

I have a Voice Call in which I would like to have a little overlay showcasing which users have their audio muted. Is there a callback I can use to know whether users have locally muted their stream?
I have not found a way to do this directly using agora.io's library.
You can use the onRemoteAudioStateChanged API: https://docs.agora.io/en/Video/API%20Reference/java/classio_1_1agora_1_1rtc_1_1_i_rtc_engine_event_handler.html#a24fd6b0d12214f6bc6fa7a9b6235aeff

Streaming web video to Roku

Does anyone know how technically to send videos (i.e. Youtube Videos) to a Roku player? There is a "Twonky Beam" app that allows streaming and what it appears to do is to send .mp4 files to Roku for playback. See the demo here: http://gigaom.com/video/youtube-on-roku-twonky-airplay/
This is done without a "Twonky Beam" Roku app. Looks like something that Roku supports natively, although I cannot find anything documented.
I want to know how they were able to accomplish this without Roku being a UPNP or DLNA device.
Any insights here would be great!
There are discussions on how to extract the mp4 URL from YouTube here and here
In terms of how to do airplay style video playback on Roku, you would use the External Control Protocol to launch a channel with the URLs of the video you wish to play back, or once your channel is launched, us the ECP in combination with the roInput component to send the URL's to your channel. Your channel would then send the URLs to a video playback compoenent which would initiate playback from Youtube or whatever source you send it. If you want to play URL's from your device (android/IOS) you would need to run a web server on the device to serve videos to the device.
here is an Open Source YouTube project referenced in that second thread.
Any unofficial project that plays video's from YouTube is subject to DMCA takedown by YouTube should they decide your project does not fit with their goals.
roInput is not really well documented, here is an example that demonstrates both roInput and launch parameters (launch parameters are keywords you include in an http POST):
function main(params as object)
if params.parameter <> invalid then
print "This channnel was launched with Launch Parameters!"
print params
else
print "launched without input parameters"
end if
port=CreateObject("roMessagePort")
input=createobject("roInput")
input.setmessageport(port)
while true
msg=wait(100,port)
if type(msg)="roInputEvent" then
params=msg.getinfo()
print params
end if
end while
end function
so your parameters might be "vidurl=http://myserver.com/video300k.mp4&vidurl=http://myserver.com/video600k.mp4" if you wanted to send multiple bit rate videos.
there are plenty of examples of how to play video on a Roku in the RokuSDK, the simplest being the simplevideoplayer exmaple.
As to the last part of the question re UPNP, you can find a roku on your lan either via brute force telnet on port 8060 to every ip or by using SSDP, also documented in the ECP guide linked above