YouTube2Text

The Capabilities of Roblox's NEW Audio API (Voice Filters, Analyzers, etc.) — Transcript

by BrawlDev · 5,093 words · 673 segments · language en · Watch on YouTube

Full transcript

  1. 0:00Roblox recently expanded their audio API
  2. 0:02that can allow us to do some really cool
  3. 0:04stuff with them such as we can
  4. 0:06manipulate our voice chat to different
  5. 0:09filters within the game which I think is
  6. 0:11actually really really cool there's a
  7. 0:13lot of filters go through with and I
  8. 0:15will give credit to the person who
  9. 0:17created this game because this is to
  10. 0:20discover we can have multiple speakers
  11. 0:22playing the same audio at the same time
  12. 0:25if I drag my listener closer to here you
  13. 0:27can hear it better if I drag out of it
  14. 0:29go to this one it's playing the same
  15. 0:31song and we can also hear it very
  16. 0:33clearly the closer The Listener
  17. 0:35gets and one of my personal favorites
  18. 0:37that I've created is speaking so that an
  19. 0:39NPC can follow me hey Noob get over here
  20. 0:44yeah that's right he's following me as
  21. 0:46soon as I start speaking he's going to
  22. 0:48continuously follow me as I continue
  23. 0:52speaking I'm over
  24. 0:57here I'm actually over here dude how
  25. 1:00insane is that this update is so cool so
  26. 1:02yes this new audio API adds 15 new
  27. 1:05instances to it and we can do a whole
  28. 1:07bunch of cool things with them that
  29. 1:09include voice input multiple listeners
  30. 1:11effects and inworld microphones So based
  31. 1:14on the examples that I showed you we
  32. 1:15were able to do all of this using the
  33. 1:18new API and some of these instances
  34. 1:20include all of these different things
  35. 1:22here which I'm going to go over some of
  36. 1:24these inside of this episode and kind of
  37. 1:27just break down everything that I've
  38. 1:29been able to discover from this new
  39. 1:31update up until this point I recommend
  40. 1:33wearing headphones for this video so
  41. 1:35that you can really get to see the
  42. 1:36difference when it comes to the audio
  43. 1:38and with that being said let me show you
  44. 1:39more of what I've got in store for you
  45. 1:41for this video all right let's think
  46. 1:43about this for a minute I'm going to
  47. 1:44show you an example of how the new audio
  48. 1:46structure is formatted uh in the most
  49. 1:49simplest way possible so that you can
  50. 1:51understand how the stuff works because I
  51. 1:52know it definitely trips up a lot of
  52. 1:54people okay but let's say we have a
  53. 1:56sound or piece of music that we want to
  54. 1:59produce in the game and we want to be
  55. 2:01able to listen to it the first thing we
  56. 2:03would need to do is get an audio input
  57. 2:06so that we know that this is a sound or
  58. 2:08music that we want to play so this is
  59. 2:09basically what it looks like right here
  60. 2:11we have an audio player but this can
  61. 2:14also act as audio input it doesn't
  62. 2:15matter what it is as long as we know
  63. 2:17that there is sound coming from
  64. 2:19somewhere and in this case it's going to
  65. 2:21be coming from an audio player because
  66. 2:22we want to play music now we have the
  67. 2:25sound but how do we actually project
  68. 2:27this sound or music or whatever it is we
  69. 2:30send this to an audio emitter is what
  70. 2:33this object is called and we can kind of
  71. 2:35think of this as a speaker so you pretty
  72. 2:37much know that Sound and Music can come
  73. 2:40from a physical speaker uh cuz that's
  74. 2:42where we're able to hear the sound
  75. 2:44coming from a speaker also known as an
  76. 2:47audio emitter uh that's being played
  77. 2:49from an audio player so we have this
  78. 2:52structure so far but that's not the only
  79. 2:55thing that we need because what happens
  80. 2:57if we just use an audio emitter or this
  81. 2:59speaker to project sound it's just going
  82. 3:02to project the sound into the world uh
  83. 3:04with nobody to listen to that sound so
  84. 3:07what do we need to do we need to add an
  85. 3:10audio listener but you may have noticed
  86. 3:12that these two are not linked together
  87. 3:13that's because an audio listener uh
  88. 3:16simply just needs to listen for a
  89. 3:18specific sound coming from this audio
  90. 3:21emitter as long as they're in the same
  91. 3:22audio group now I'm going to introduce
  92. 3:24you to that later in this episode but
  93. 3:26basically this audio listener we can
  94. 3:28treat this as our ears so our ears
  95. 3:31Listen to Sound and Music so when we
  96. 3:35hear music coming from this speaker
  97. 3:39that's how we're able to capture the
  98. 3:40sound to know that this is where we're
  99. 3:43hearing the music from and finally what
  100. 3:45we do is we link this audio listener so
  101. 3:48we have the uh the music or Sound or
  102. 3:50whatever and we link this to an audio
  103. 3:52device output so that we can actually
  104. 3:54hear the sound in the game this is a
  105. 3:57basic structure of how you play music
  106. 4:00thinking about this in terms of how the
  107. 4:01new audio system works and it's kind of
  108. 4:04difficult to get your head wrapped
  109. 4:05around it at first but I'm going to show
  110. 4:07you what this looks like in Roblox
  111. 4:09studio so we're going to be able to
  112. 4:10implement this so I hope this part made
  113. 4:12sense to you just a little bit okay so
  114. 4:14we're now going to try implementing what
  115. 4:16I just showed you with the previous
  116. 4:18model that's shown right here uh that
  117. 4:20basically allows us to have an audio
  118. 4:21player with a certain song and we're
  119. 4:23going to be able to project it in the
  120. 4:25game uh by doing so and the first thing
  121. 4:27we're going to do is try and look for a
  122. 4:29song inside of the audio Marketplace it
  123. 4:32really doesn't matter which one you use
  124. 4:33so I'm just going to insert this one
  125. 4:35that I just found right here so I'm
  126. 4:36going to hit insert uh so it's going to
  127. 4:38be inserted on the right side of the
  128. 4:39screen what I'm going to do is copy the
  129. 4:42sound ID so I'm going to uh click on
  130. 4:44this hit contrl + C and then what we're
  131. 4:46going to do is actually delete this
  132. 4:47because we're not going to use the
  133. 4:48actual sound we're trying to create our
  134. 4:50own sound structure so what we're going
  135. 4:53to do now is make a folder so that we
  136. 4:55can organize our structure so I'm going
  137. 4:56to create a folder I'm going to call
  138. 4:58this one audio player example I'm just
  139. 5:02going to call it that and what we're
  140. 5:04going to do now is click on the plus
  141. 5:05sign we're going to add an audio player
  142. 5:09so if we hit the plus sign we're going
  143. 5:10to hit
  144. 5:12audio player so this is what it looks
  145. 5:14like right here so we're going to do
  146. 5:16that and then once we go into this audio
  147. 5:18player there's a bunch of properties
  148. 5:20here but the thing that we're most
  149. 5:21interested in is this property called
  150. 5:24asset ID so we're going to click on this
  151. 5:27going to paste our asset ID and it's
  152. 5:29going to say that it's ready and it
  153. 5:31updated the time length automatically
  154. 5:33for us to uh do so I'm also going to
  155. 5:35turn on looping so that we can
  156. 5:37constantly hear the song uh while the
  157. 5:39game is running uh so we now have our
  158. 5:41audio player which basically tackles uh
  159. 5:43the first step right here but now what
  160. 5:45we need next is an audio emitter so I'm
  161. 5:48going to structure this audio emitter uh
  162. 5:50by using Parts like we've done over here
  163. 5:53so I'm going to go to model I'm going to
  164. 5:55hit part and this part I'm going to call
  165. 5:58emitter and I'm going to put this inside
  166. 6:00of the audio player example and I'm also
  167. 6:03going to change the color so that it's
  168. 6:05distinguishable from the other ones I'm
  169. 6:06going to make this lapis okay so now we
  170. 6:09have our emitter what we do now is we
  171. 6:13insert inside of this emitter uh an
  172. 6:16audio emitter and this is what it looks
  173. 6:19like so we're going to click this this
  174. 6:21is our audio emitter right here and now
  175. 6:24here's the important step that we have
  176. 6:25to do so you noticed in our model I
  177. 6:28linked the these two together using an
  178. 6:30audio player and an audio emitter but
  179. 6:33how do we actually link these two
  180. 6:34together we use what's known as a wire
  181. 6:37uh to connect these two together because
  182. 6:39that's pretty much how audio Works in
  183. 6:40real life you connect multiple sources
  184. 6:42of audio together so that they produce
  185. 6:44sound so that's basically what we're
  186. 6:46going to do here uh what we're going to
  187. 6:47do is click on the plus sign on audio
  188. 6:50emitter and we're going to search up
  189. 6:51wire so it looks like this and on this
  190. 6:54wire we need to make sure that our
  191. 6:56source instance and Target instance is
  192. 6:59accurate so our source is basically
  193. 7:01going to be where the sound is coming
  194. 7:03from so the source we're just going to
  195. 7:04click on this and we're going to select
  196. 7:06our audio player because this is
  197. 7:08basically where the sound is coming from
  198. 7:09and we want to send this sound over to
  199. 7:13our Target which is going to be our
  200. 7:14audio emitter because this is where uh
  201. 7:16the emitter can produce the sound and
  202. 7:19make it project into the world so now
  203. 7:22that we have that what we need to do is
  204. 7:25insert an audio listener and we're going
  205. 7:27to make another part specifically for
  206. 7:29that so I'm going to insert a part right
  207. 7:31here and I'm going to call this one The
  208. 7:34Listener and I'm going to insert this
  209. 7:36inside of the audio player example so
  210. 7:38we're going to hit the plus sign here
  211. 7:39and then we're going to add an audio
  212. 7:41listener okay and so now we have an
  213. 7:43audio listener that's waiting for us to
  214. 7:45hear the sound but how do we know which
  215. 7:47sound we're trying to listen to
  216. 7:49specifically because there can be
  217. 7:51multiple audio listeners there can be
  218. 7:52multiple audio emitters so how can we
  219. 7:55tell the difference what we can do is
  220. 7:57set this property called audio
  221. 7:58interaction group to basically tell us
  222. 8:01that this is the right audio that we
  223. 8:03want to try and listen to uh from this
  224. 8:07emitter specifically so we're just going
  225. 8:08to call this um music just for just for
  226. 8:12Simplicity sake and so we're going to do
  227. 8:14the same thing down here with audio
  228. 8:16listener we're just going to call this
  229. 8:17one music and finally we need an audio
  230. 8:21output and you can put this audio output
  231. 8:23wherever you want but I'm going to put
  232. 8:24this inside of the audio listener so I'm
  233. 8:26going to hit the plus sign I'm going to
  234. 8:27add an audio device output so basically
  235. 8:31this thing right here and then I'm going
  236. 8:34to hit the plus sign here add a wire so
  237. 8:36that we can link the audio listener to
  238. 8:41the audio device output so that we can
  239. 8:44finally hear the sound coming from this
  240. 8:48uh part specifically so this is going to
  241. 8:51be the listener I'm going to make this
  242. 8:52one red so that we can tell the
  243. 8:54difference between them and this is
  244. 8:56pretty much our basic structure for uh
  245. 8:58our audio player but obviously we need
  246. 9:01to be able to play the sound so I'm just
  247. 9:03going to add a simple script inside of
  248. 9:05our audio player and what we're going to
  249. 9:08do is say script. parent colon play open
  250. 9:13and close parentheses and that is
  251. 9:14basically all we need to do for that so
  252. 9:17that is how we structure our audio
  253. 9:19player so now let's go into the game and
  254. 9:21hit test and hit play to see what
  255. 9:23actually happens and once again I
  256. 9:24recommend having headphones on so that
  257. 9:26we can really see the difference here
  258. 9:28okay so our music seems to working as
  259. 9:29expected we have the emitter and we have
  260. 9:31the listener but let's see what happens
  261. 9:34if I go into the server side I'm going
  262. 9:36to move the emitter this way to the
  263. 9:39right just a little bit if we go into
  264. 9:42the game we can now hear that the
  265. 9:44listener is on the left side of this
  266. 9:47speaker which is why we're hearing more
  267. 9:49of the sound coming from the left side
  268. 9:51than the right side and if we move our
  269. 9:55speaker this way uh to the left this
  270. 9:57time and our listeners on the right side
  271. 9:59we can hear more of the sound coming
  272. 10:02from the right side rather than the left
  273. 10:04side and this is really fascinating cuz
  274. 10:06like this gives us more control over um
  275. 10:10our audio levels where we uh project the
  276. 10:12audios where we project the audio from
  277. 10:14and all that sort of stuff and if I
  278. 10:16bring it closer and if I bring the two
  279. 10:19closer together like they are basically
  280. 10:20synonymous with each other then you can
  281. 10:23hear it very clearly from both sides of
  282. 10:26our ears so that is a really basic
  283. 10:29example of of an audio player and I
  284. 10:33think it's really cool okay now I did
  285. 10:35show you uh one of the examples at the
  286. 10:37beginning of this video where we were
  287. 10:39able to create multiple speakers with
  288. 10:41the same listener and they were they
  289. 10:43were both playing the same song at the
  290. 10:46same time uh it's really easy to
  291. 10:48implement this once we have the
  292. 10:49structure going on all we really need to
  293. 10:51do is just uh take our emitter duplicate
  294. 10:54it and then make sure that our uh wire
  295. 10:57is connected to the the audio player uh
  296. 11:00with the right target instance of the
  297. 11:01audio emitter so the only thing we need
  298. 11:03to update is this target instance to be
  299. 11:06uh in correlation to this audio emitter
  300. 11:09right here and so now we have two
  301. 11:11speakers playing the same song at the
  302. 11:13same time so if we go into the game now
  303. 11:16and see this change we can see um that
  304. 11:19it's working basically as expected okay
  305. 11:21so we're now listening to the music
  306. 11:22we're right here in the center with our
  307. 11:24listener if I move the listener closer
  308. 11:26to this speaker then we can hear music
  309. 11:30coming from
  310. 11:31this and if we decide to move it to the
  311. 11:33right side then we can hear that it's a
  312. 11:37little bit louder on the left side
  313. 11:39because our listener is really really
  314. 11:41close to this speaker on the left side
  315. 11:43but then if I move this over here this
  316. 11:45listener is really really close to the
  317. 11:48right side of this speaker so that's why
  318. 11:50we're able to hear it more clearly on
  319. 11:52the right side again it's very
  320. 11:54fascinating but it is hard to wrap your
  321. 11:56head around uh if you're new to all this
  322. 11:58but I hope that this gives you more
  323. 12:00insight into into the possibilities of
  324. 12:03creating your own audio structures in
  325. 12:05Roblox Studio okay now I'm not going to
  326. 12:07go in depth with filters and effects
  327. 12:10that you can add to audio but I
  328. 12:12definitely do think it's a cool thing to
  329. 12:14experiment with so if if I'm in this
  330. 12:16place this place is basically made uh
  331. 12:18for demonstrating this new audio API um
  332. 12:22we basically have uh the ability to add
  333. 12:25effects to the sound that's currently
  334. 12:27being played right now so we can add a
  335. 12:29pitch shift effect that adds pitch to it
  336. 12:31we can even Reverb it and then we can
  337. 12:33add an equalizer and we can also add a
  338. 12:36distortion to it so these effects are
  339. 12:38pretty cool you basically need to create
  340. 12:40uh an effect for each individual one and
  341. 12:43you need to link it to the audio emitter
  342. 12:45and that's basically how you manipulate
  343. 12:47the sound using it so again I'm not
  344. 12:49going to go too deep into detail with uh
  345. 12:51effects but these are still really cool
  346. 12:54features to have uh and to consider when
  347. 12:57you're manipulating audio in Roblox
  348. 12:59studio all right and the last thing I'm
  349. 13:01going to show in this video is how I was
  350. 13:03able to use my voice uh basically my
  351. 13:06voice chat to be used within the game so
  352. 13:10that there can be certain things
  353. 13:11happening like this NPC following me uh
  354. 13:14every time that I chat within the game
  355. 13:16it's a really cool feature we can now
  356. 13:18use our microphone to interact with the
  357. 13:20game world because before uh our voice
  358. 13:23chat was basically used to communicate
  359. 13:25with other players but this new audio
  360. 13:27API allows us to interact with the world
  361. 13:30using our own voice which I think it's
  362. 13:32very very cool so I'm going to show you
  363. 13:34a little diagram of what I did and I'm
  364. 13:36going to show you a little bit of what I
  365. 13:38did with the scripts so that it can give
  366. 13:40you so that it can give you a bit of an
  367. 13:42insight to know more about how this
  368. 13:45audio API works okay this looks kind of
  369. 13:48confusing but I will try to break this
  370. 13:50down to the best of my ability step by
  371. 13:52step what you're hearing right now from
  372. 13:54me is the audio coming from my character
  373. 13:57uh rather than my mic microphone that I
  374. 13:59normally use to record these videos
  375. 14:01because uh there's audio coming from my
  376. 14:03character but there's also audio coming
  377. 14:04from my microphone for recording this
  378. 14:06video which is why I had to mute it um
  379. 14:09but basically what we have going on here
  380. 14:11is uh a structure that looks similar to
  381. 14:14what we worked with before uh using an
  382. 14:17audio player so you might have noticed
  383. 14:19that we have an audio device input
  384. 14:21instead of an audio player uh everything
  385. 14:23else here seems relatively the same we
  386. 14:25have the audio emitter we have the
  387. 14:27listener and we have the audio device
  388. 14:29output but things are just a little bit
  389. 14:31different so I'm going to try and
  390. 14:33explain to you what the difference here
  391. 14:34is so we need to try and figure out
  392. 14:37where is the source of this audio coming
  393. 14:39from uh in our previous example it came
  394. 14:42from an audio player because we wanted
  395. 14:44to play sound or music coming from uh
  396. 14:47the toolbox's marketplace but this time
  397. 14:50what we want is an input coming from our
  398. 14:53microphone uh from our player so pretty
  399. 14:57much our audio device input is a more
  400. 15:00general term for getting an audio input
  401. 15:03from somewhere because before it was the
  402. 15:05audio player but in this case we want it
  403. 15:07to come from our player and so if we
  404. 15:09open up our players and open up our
  405. 15:11player we can see that there is well
  406. 15:14there's supposedly one audio device
  407. 15:16input but there's two of them just for
  408. 15:17testing purposes so I want you to
  409. 15:19imagine there's just one this is the
  410. 15:21audio device input coming from our
  411. 15:23player but now what we need to do is we
  412. 15:26have the sound but we need to be able to
  413. 15:28produce this sound and project it into
  414. 15:30the world this is where we need to use
  415. 15:33our character we're going to put this
  416. 15:35audio emitter uh also know as our
  417. 15:37speaker inside of our character so if we
  418. 15:39go to the workspace open up our
  419. 15:41character we can see that there's an
  420. 15:42audio emitter just pretend that there's
  421. 15:44one uh that has a wire that connects our
  422. 15:47input from our player to our character
  423. 15:51so I hope this part is making sense to
  424. 15:53you so far like we're basically taking
  425. 15:54the the the voice input from our player
  426. 15:57and we're going to project this onto our
  427. 15:59characters so that's how you're able to
  428. 16:01hear the voice coming from my character
  429. 16:04right now it's because we have an
  430. 16:05emitter that's producing this sound and
  431. 16:07it's coming from my character but now
  432. 16:10that we have that we need to have a
  433. 16:11listener of course and so we basically
  434. 16:14have an audio listener that listens for
  435. 16:16this audio coming from our character and
  436. 16:18if you remember we use an audio
  437. 16:20interaction group to specify which sound
  438. 16:24we're looking for specifically so once
  439. 16:26we have that then we're able to use an
  440. 16:29audio device output to be able to
  441. 16:31actually hear the sound that's being
  442. 16:33produced and in this case our audio
  443. 16:35listener is inside of our character and
  444. 16:38our uh audio device output is also in
  445. 16:41our character but specifically in the
  446. 16:43audio listener so this is how we're able
  447. 16:45to take the player's voice uh project it
  448. 16:48onto our character and then listen for
  449. 16:50it and then hear it on our character but
  450. 16:54here's one interesting thing you might
  451. 16:56notice that we have what's known as an
  452. 16:58audio analyzer you might ask what the
  453. 17:00heck is an audio analyzer this basically
  454. 17:03tells us that we can measure our audio
  455. 17:06to know how loud or how soft our uh
  456. 17:10input is in this case how loud or how
  457. 17:13soft my microphone is so this is how I
  458. 17:15was able to whisper so quietly so that
  459. 17:19uh the NPC couldn't hear me but then
  460. 17:21when I shouted really loudly that's when
  461. 17:23the NPC was able to pick it up and then
  462. 17:25move over to my character uh because we
  463. 17:28were able to use an audio analyzer to
  464. 17:30analyze this and I basically took this
  465. 17:32audio analyzer and I connected it to our
  466. 17:36uh microphone input and so with all of
  467. 17:39this we have a structure that allows us
  468. 17:42to do all these sorts of things now
  469. 17:45again just from this analogy alone you
  470. 17:47might be sort of confused with it but I
  471. 17:48highly recommend going through with this
  472. 17:50and just experimenting because
  473. 17:52experimentation and struggling through
  474. 17:54is what's going to get you to learn how
  475. 17:55this stuff works but with that being
  476. 17:57said I'm going to show show you what the
  477. 17:59scripts look like so that we can
  478. 18:00actually see this in action let me try
  479. 18:02and break down the scripts for you so
  480. 18:04that you can see how I was able to
  481. 18:05incorporate this new feature inside of
  482. 18:07my game um and the first thing I'm going
  483. 18:10to introduce to you is the NPC itself so
  484. 18:13this NPC has two scripts one of them is
  485. 18:15animating and the other one is follow
  486. 18:16player animates basically just so that
  487. 18:18the character can actually move around
  488. 18:19in the game and stuff but let's look at
  489. 18:21follow player so if we open this up we
  490. 18:24can see that this is referencing
  491. 18:26something inside of replicated storage
  492. 18:28so if we go to replicated storage let's
  493. 18:30open this we we can see that we're using
  494. 18:33an unreliable remote event called NPC
  495. 18:35follow and this is basically going to
  496. 18:38capture any firing that happens onto the
  497. 18:40server uh so that we can make the
  498. 18:42character or we can make the NPC move to
  499. 18:45wherever the character is also known as
  500. 18:47our player inside of the game wherever
  501. 18:49it is and then we're just going to wait
  502. 18:50until it finishes so right now this
  503. 18:52seems to be pretty self-explanatory it
  504. 18:54doesn't seem to be too complicated right
  505. 18:55now but let's go outside of here and
  506. 18:59what I'm going to show you now is the
  507. 19:01main script that basically allows us to
  508. 19:04have all of these things hooked up onto
  509. 19:06our players so that we can incorporate
  510. 19:08this uh audio design into our game so
  511. 19:11this is going to be a local script
  512. 19:13called Radio Chat I mean I basically
  513. 19:14just took this from uh that default
  514. 19:17starter Place uh that represents uh the
  515. 19:19the new audio uh but I modified it
  516. 19:21myself so that it uh can work with what
  517. 19:24I'm trying to do here so basically uh
  518. 19:26what's happening is let's go down here
  519. 19:28onto on player added so we're creating
  520. 19:31an audio input device and putting this
  521. 19:33inside of our players so basically this
  522. 19:36first step right here adding the audio
  523. 19:38input device uh trying to get the
  524. 19:40player's uh microphone uh and so we're
  525. 19:43also going to make an event every time
  526. 19:46the character has spawned into the world
  527. 19:48so we're going to go up here we're going
  528. 19:49to go into on character spawned and what
  529. 19:51we're doing now is creating an audio
  530. 19:54emitter and putting this inside of
  531. 19:55character and we're also setting the
  532. 19:57audio intera Action Group to something
  533. 19:59called NPC follow uh so basically it's
  534. 20:02this right here we're basically putting
  535. 20:04this inside of our character so that we
  536. 20:06can project sound onto our character uh
  537. 20:09whenever we get the input from the
  538. 20:11player's microphone we're going to
  539. 20:12project it onto our character and then
  540. 20:14we basically use this helper function
  541. 20:16called connect which basically just
  542. 20:18creates a wire uh that takes in um the
  543. 20:21source and then the destination so
  544. 20:22that's how we're able to create this
  545. 20:24line This linking together using a wire
  546. 20:27it's a pretty useful um helper function
  547. 20:30so that's what we're going to be using
  548. 20:32um but this basically takes in uh the
  549. 20:34microphone input which is the source and
  550. 20:36we basically made that down here which
  551. 20:38is inside of our player uh and then the
  552. 20:39emitter that we just created that's
  553. 20:41inside of our character so the next
  554. 20:43thing is we're going to create a
  555. 20:44listener and we're also going to put
  556. 20:46this inside of the character we're going
  557. 20:47to make sure the audio interaction group
  558. 20:49is the same as our emitter uh so that we
  559. 20:52can listen for the audio emitter but not
  560. 20:55directly using a wire or anything like
  561. 20:57that we don't need to do do that um but
  562. 20:59then we're going to create a device
  563. 21:01output an audio device output and put it
  564. 21:03inside the listener and then we're going
  565. 21:04to connect the listener to the audio
  566. 21:08device output uh and then so what we do
  567. 21:09now is we basically create an analyzer
  568. 21:12we set this up inside of our character
  569. 21:14uh and then we connect our microphone
  570. 21:16input to the analyzer that we just
  571. 21:19created that's inside of our character
  572. 21:20so that is another final step that we
  573. 21:22have to do for that so now we have the
  574. 21:24hookup what we need to do is basically
  575. 21:26use a while true do statement to
  576. 21:29constantly check if uh I'm talking
  577. 21:32inside the microphone we use the
  578. 21:34analyzer to detect if my voice is loud
  579. 21:37enough uh to then basically use this NPC
  580. 21:40follow uh unreliable remote event and
  581. 21:43fire it so that we can use the uh NPC's
  582. 21:47follow player script to then follow my
  583. 21:49character wherever it is inside of the
  584. 21:51world so that is something that we uh
  585. 21:54pretty much do with our script so if I
  586. 21:56go back we can see that with our while
  587. 21:58your du statement it's going to
  588. 21:59constantly say that there's no sound
  589. 22:01being produced but once the analyzer
  590. 22:03picks up our RMS level to be anything
  591. 22:05higher than 0.1 so that's when I'm like
  592. 22:07shouting and stuff like that um because
  593. 22:09zero is like no sound is being produced
  594. 22:11at all 0.1 is like the bare minimum
  595. 22:13we're going to fire the NPC follow it's
  596. 22:15going to be sent to the follow player
  597. 22:17and then the NPC is going to follow our
  598. 22:19character so that is basically how it
  599. 22:21works and that is the basic rundown of
  600. 22:23how the script works so if I go into the
  601. 22:25game that's pretty much what it's going
  602. 22:26to be like uh where the NPC is just
  603. 22:28going to be following me and that is the
  604. 22:31basic rundown of how I was able to
  605. 22:32script this inside of Roblox studio and
  606. 22:35I honestly think it's very very
  607. 22:36fascinating now here's my recommendation
  608. 22:39for if you're adding your own audio
  609. 22:41structure to your game I definitely
  610. 22:43recommend having some sort of diagram or
  611. 22:45structural layout so that you can
  612. 22:47visually see how all of these audio
  613. 22:50objects are are connected with each
  614. 22:53other because if you were just to look
  615. 22:54at this inside of a script you'd be very
  616. 22:56confused having to just just like go
  617. 22:58through see what's being connected
  618. 23:00what's not being connected and things
  619. 23:01like that uh or looking at it inside of
  620. 23:03the Explorer I think it's definitely a
  621. 23:04lot better if you had a visual
  622. 23:06representation like this uh so that you
  623. 23:09can understand this I definitely
  624. 23:10struggled with this a little bit when I
  625. 23:12first learned about this but uh
  626. 23:13struggling through just to like learn
  627. 23:15how this stuff works will definitely be
  628. 23:17beneficial for you in the long run and
  629. 23:19that is just something I recommend and I
  630. 23:20hope you're able to take away a lot of
  631. 23:22information from this video and you
  632. 23:24found this to be extremely extremely
  633. 23:25valuable once again I hope this video
  634. 23:28helped you a lot um there are some
  635. 23:29things in this video that I did not go
  636. 23:31over like being able to call up somebody
  637. 23:34else that's inside of the server like if
  638. 23:36you had a walkie-talkie or if you had a
  639. 23:37phone you can have a phone and you can
  640. 23:40call up somebody else like another
  641. 23:42player who's on the other side of the
  642. 23:43world and you can hear them through the
  643. 23:45phone which I think that's also very
  644. 23:46cool but I'm not going to go over how to
  645. 23:48do that inside of this video um but I'm
  646. 23:50just throwing out more examples of the
  647. 23:52possibilities of what you can do with
  648. 23:54this new audio API once again this audio
  649. 23:56API is in beta so I don't think it's
  650. 23:59fully so I don't think it's released to
  651. 24:01the public right now but I highly
  652. 24:03recommend going through and
  653. 24:04experimenting with this new API because
  654. 24:06there's so many new possibilities you
  655. 24:08can do with everything that this API has
  656. 24:11to offer now so if you really liked this
  657. 24:13video then I encourage you to like this
  658. 24:15video and also share it to other people
  659. 24:17who you think might also find this sort
  660. 24:19of stuff to be fascinating or just or
  661. 24:21just something that uh your friends
  662. 24:22would want to learn about um but also
  663. 24:24subscribe because I'm going to be having
  664. 24:26more videos like this in the future so
  665. 24:28if you really liked it then be sure to
  666. 24:30be on the lookout for that um my Discord
  667. 24:32server is in the description so if you
  668. 24:33want to meet other like-minded
  669. 24:35developers then you can do that as well
  670. 24:37um but that's going to be pretty much it
  671. 24:38for this video and with that being said
  672. 24:40I will see you in the next episode take
  673. 24:42care

About this transcript

This page contains the full transcript of The Capabilities of Roblox's NEW Audio API (Voice Filters, Analyzers, etc.) by BrawlDev, generated from the public captions YouTube serves with the video. The transcript has 5,093 words across 673 segments, with the original timestamps preserved so you can click any line to jump to that moment in the embedded player.

What you can do with it

Use the transcript to take notes, quote the speaker, build a study guide, generate a summary with ChatGPT or Claude via the YouTube Summary tool, or export it as a timed subtitle file with YouTube to SRT. You can also re-open it in the transcriber to choose a caption track available on the video.

Free YouTube transcript tool

YouTube2Text is a free YouTube transcript generator — no signup, no daily limit. Paste any YouTube link and get the full transcript instantly, with timestamps, click-to-jump, caption language selection, AI prompts for ChatGPT, Claude, and Gemini, and exports to TXT, SRT, VTT, or Markdown.