Message Boards Message Boards

Creating Star Wars Kylo Ren voice in one line of code

Posted 6 years ago

MODERATOR NOTE: for true Star Wars fans this post has a related Wolfram Cloud App, which you can access by clicking on the image below. Read the full post below to understand how the app works. May the Force be with you.

enter image description here


Kylo Ren voice in Star Wars The Force Awakens is very cool. When I watched the movie in 2015, one of the first things that came up to my mind was how to do such voice in Mathematica. At the time Mathematica capabilities to manipulate sounds were very simplistic, and was not possible to do such thing.

I'm far far way to be a sound expert, but I tried do something like this:

file = Import["https://s3-sa-east-1.amazonaws.com/rmurta/murta-audio.wav"];
audioOrg = Audio[file];
audioKylo = AudioPitchShift[audioOrg, 0.9];
audioKylo = AudioFrequencyShift[audioKylo,-200]//AudioAmplify[#, 4]&

Kylo Voice

youtube link for Kylo

See original post in Stack Exchange, where I ask for improvement in the sound hack.

After that, why not create a cloud app for that?!

This is amazing about Mathematica, with one line of code you can create a App, and everybody can play with It!

CloudDeploy[FormFunction[{"sound"->"Sound"},
AudioAmplify[AudioFrequencyShift[AudioPitchShift[#sound,0.9],-200],4]&],
"kylo-voice-by-murta",Permissions->"Public"]

Here is the link, so you can try it: kyle-voice-by-murta.

Record your sound and speak like Kylo!

POSTED BY: Rodrigo Murta
5 Replies

Very nice! But surprisingly that type of processing does not make laughing scary. So this is a stab at scary laughs:

In the code below notice I overlaid the original and processed audio, in addition to other filters.

laugh=ExampleData[{"Audio","Laughing"}];
AudioOverlay[{
    AudioAmplify[laugh,7],
    AudioAmplify[
       AudioReverb[
         AudioDelay[
          AudioFrequencyShift[
              AudioPitchShift[laugh,0.6],
          -300],
         1,.5],
       "LargeHall"],
    20]
}]

CloudDeploy[ExportForm[%, "MP3"], "vkLaughingScary", Permissions -> "Public"]

CloudDeploy[ExportForm[laugh, "MP3"], "LaughingExampleData", Permissions -> "Public"]
POSTED BY: Vitaliy Kaurov

enter image description here - Congratulations! This post is now a Staff Pick as distinguished by a badge on your profile! Thank you, keep it coming!

POSTED BY: Moderation Team

Very nice, indeed!
This might just be my tacky sense of humour, but I couldn't resist!

pickUpLines = 
  Flatten[Table[
    Take[StringSplit[
      Import[StringTemplate[
         "http://pickup-lines.net/cute/page/`1`/"][i]], 
      "\[HeartSuit]"], {2, -2}], {i, 5}]];

kyloRen[string_] := Block[{audioOrg, audioKylo},
  audioOrg = SpeechSynthesize[string];
  audioKylo = AudioPitchShift[audioOrg, 0.9];
  Legended[
   Normal[AudioFrequencyShift[audioKylo, -200] // 
     AudioAmplify[#, 4] &], string]]

kyloRen[RandomChoice[pickUpLines]]

Cheers,
George

Awesome, I think computer OS generated voice adds some nice touch to it.

POSTED BY: Vitaliy Kaurov
Posted 6 years ago

Being a star wars and star trek fan here a variation from my side So this is a stab at scary laughs as well

pickUpLines = 
      Flatten[Table[
        Take[StringSplit[
          Import[StringTemplate[
             "https://allpickuplines.com/best-starwars-pick-up-lines/`1`/"][i]], 
          "\[HeartSuit]"], {2, -2}], {i, 5}]];

    kyloRen[string_] := Block[{audioOrg, audioKylo},
      audioOrg = SpeechSynthesize[string];
      audioKylo = AudioPitchShift[audioOrg, 0.9];
      Legended[
       Normal[AudioFrequencyShift[audioKylo, -200] // 
         AudioAmplify[#, 4] &], string]]

    kyloRen[RandomChoice[AllPickUpLines]]

cheers, Matt

POSTED BY: Matt dowson
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract