Text to Speech with AWS Polly in Unity!

Поделиться
HTML-код
  • Опубликовано: 8 сен 2024

Комментарии • 83

  • @jamesaldridge1128
    @jamesaldridge1128 Год назад +12

    Why do you not have way more views? These are amazing tutorials

    • @sgt3v
      @sgt3v  Год назад

      Thank you James :0)

  • @itox8924
    @itox8924 9 месяцев назад +7

    Is there anything additional I need to do to use Oculus Quest 3 in my build? It runs fine on Windows, but when I build it on Oculus, it doesn't speak.:) Please tell me how.

  • @squer1000
    @squer1000 Год назад +1

    Guys like this making world a better place....

  • @sean-liu
    @sean-liu Год назад +2

    You made a tutorial about NPC with ChatGPT, two tutorials about Text2Speech & Speech2Text, I almost know what you gonna make in the next video! Really looking forward to it!

    • @sgt3v
      @sgt3v  Год назад +3

      👀👀

  • @Camilosolanoro
    @Camilosolanoro 7 месяцев назад +2

    esto no me funciona con oculus y unity no suena el audio porque???

  • @ciaronfitzpatrick8011
    @ciaronfitzpatrick8011 3 месяца назад

    These tutorials are excellent! Thank you so much for making them!

  • @SelfSimilarJosh
    @SelfSimilarJosh Год назад +1

    Thank you very much! Excellent explanation. I followed each step and it's working on my end. I'm surprised to say I found this organically through a search, and only two days after it was uploaded!

    • @sgt3v
      @sgt3v  Год назад +1

      Hi Joshua glad to hear that it worked without a problem. I hope that youtube does it's recommendation magic and more people can get use out of this video series 😄 I myself found it hard to implement certain things at point, so also wanted to share my findings so others do not struggle the way I did :0)

    • @SelfSimilarJosh
      @SelfSimilarJosh Год назад

      @@sgt3v Certainly, let's hope the algorithm does what it does best. I found this on Google by searching almost your exact video title.
      Did you by chance experiment with actually building this model to an Android Device?

    • @sgt3v
      @sgt3v  Год назад +2

      @@SelfSimilarJosh the example as is wont work in android since file save path is slightly different.
      before making download request URL can be corrected like this so it works everywhere:
      #if UNITY_ANDROID
      audioPath = $"jar:file://{Application.persistentDataPath}/audio.mp3";
      #elif UNITY_IOS || UNITY_OSX
      audioPath = $"file://{Application.persistentDataPath}/audio.mp3";
      #else
      audioPath = $"{Application.persistentDataPath}/audio.mp3";
      #endif

    • @SelfSimilarJosh
      @SelfSimilarJosh Год назад

      @@sgt3v That's awesome. Thanks for the reply - I'm actually going to try it out right now.

    • @hamnakhawar219
      @hamnakhawar219 9 месяцев назад

      @@SelfSimilarJosh has this built on andriod?

  • @tripnils7535
    @tripnils7535 Год назад

    Worked like a charm. Thank you for providing this tutorial.

    • @sgt3v
      @sgt3v  Год назад

      You're welcome!

  • @aknerkan3428
    @aknerkan3428 Год назад

    Clear instructions, Great tutorial!

  • @antonolivaresjuanjose2992
    @antonolivaresjuanjose2992 Год назад

    You are de number one. Thank you very much

  • @haxpor
    @haxpor Год назад

    Interesting approach you suggested from start to generate an audio for secret keys then fetch it from server. Anyhow, cheers for the video. Sparks further learning material. Thanks!

    • @sgt3v
      @sgt3v  Год назад

      yep as long as secret keys involve, it's better to take the safe road and hide them behind a backend server.

  • @Robloxzz
    @Robloxzz Год назад +2

    Thank you for the nice video :)
    I followed your instructions and put the code I wrote in unity and ran it. But when i press the play button in unity there is no AI voice and no response.
    Why did this happen? Can you give me some advice?
    (There seems to be no problem in the code, and there is no problem in the unity console.)

    • @sgt3v
      @sgt3v  Год назад +1

      Can't really know, might be related to your environment. Make sure you get text response from OpenAI

  • @loneillrt
    @loneillrt 8 месяцев назад +1

    Have you managed to get OpenAI's Text To Speech working in Unity?

  • @michealnwankwo8300
    @michealnwankwo8300 Год назад

    Thanks Sarge you have really been helpful,
    Thanks Man 🙏🏾🤗.

    • @sgt3v
      @sgt3v  Год назад

      You're welcome!

    • @michealnwankwo8300
      @michealnwankwo8300 Год назад

      @@sgt3v hello sarge thanks again for this great video, i tested mine but it gave me this error "HttpErrorResponseException: Exception of type 'Amazon.Runtime.Internal.HttpErrorResponseException' was thrown." can you help please

    • @michealnwankwo8300
      @michealnwankwo8300 Год назад

      i'm also very sure i got my access key and secret access key right

    • @sgt3v
      @sgt3v  Год назад

      @@michealnwankwo8300 can you share your code block and the whole error stack trace?

    • @michealnwankwo8300
      @michealnwankwo8300 Год назад

      @@sgt3v ok sarge, thanks

  • @NightcoreGR16
    @NightcoreGR16 8 месяцев назад

    If it's not working choose another region... I couldn't find why my audio is not playing while I'm doing everything just like the video and I needed EUCentral even though I'm in Greece :,)

  • @_sz_405
    @_sz_405 Год назад +3

    Any tests with webgl? What's the lag like for 30-40 sec speech?

    • @sgt3v
      @sgt3v  Год назад +2

      Unfortunately, ASW Polly breaks in WebGL right now. I reported it and am waiting.
      github.com/aws/aws-sdk-net/issues/2578

  • @aidenyannn
    @aidenyannn Год назад

    Great tutorial!

  • @FDany90
    @FDany90 Год назад

    Amazing. Keep Going

  • @user-ft6sx3lt8h
    @user-ft6sx3lt8h Год назад +3

    Hi, Thanks for your amazing video!
    I got a error message such as "InvalidOperationException: Cannot access the .audioClip property of an aborted DownloadHandlerAudioClip
    UnityEngine.Networking.DownloadHandlerAudioClip.GetContent".. how can I solve this?..Help me please. ;)

    • @sgt3v
      @sgt3v  Год назад +1

      You need to assign the clip when the download is completed, you might have wrong order of operations it tries to access audio clip out of using block of the web request maybe.

    • @JaceC70
      @JaceC70 Год назад +1

      @@sgt3v I am also getting this error. I've checked the code countless times and I don't see a difference, I see it is writing the file in the Application.persistentDataPath}/audio.mp3 and I can play it manually, so I know it's working to that point. However, I'm unable to read it in code despite making sure while(!op.isDone) await Task.Yield(); is correct. Any other ideas? Could this be a Mac permissions issue?

    • @JaceC70
      @JaceC70 Год назад +3

      Ok, I found the issue make sure you add "file://" in the URI. So you end up with with UnityWebRequestMultimedia.GetAudioClip(uri: $"file://{Application.persistentDataPath}/audio.mp3", AudioType.MPEG)

    • @riovk4291
      @riovk4291 Год назад +2

      @@JaceC70 Thank you so much. I spent ages struggling with this bug. Just a tip for others with this problem, when I was doing it, I needed to add the "file://" ONLY to where we read the file. Adding it to where we write the file caused its own new issue.

    • @williamowens6049
      @williamowens6049 Год назад +1

      @@riovk4291 Thank you! This little detail saved quite a bit of time.

  • @user-si5vw9zu8h
    @user-si5vw9zu8h 6 месяцев назад

    ArgumentException: Illegal byte sequence encounted in the input

  • @joybeatgames6075
    @joybeatgames6075 11 месяцев назад

    Thank you for making this awesome video. I encountered an issue that I would appreciate your assistance with. I have some pops in the audio clip sound. I think the write function saves the file at 40kps while it is processed as 24kps on AWS Poly.this might be the problem.

  • @farahzehra8952
    @farahzehra8952 Год назад

    Thanks again for the wonderful video series you are making. One quick question, is there any number of characters limit associated with AWS Polly for Text-to-Speech conversion?

    • @sgt3v
      @sgt3v  Год назад

      As far as I remember it must be 3000 characters. You can check the docs here to make sure: us-east-1.console.aws.amazon.com/polly/home/

  • @Nnadi_II
    @Nnadi_II 10 месяцев назад

    hello awesome video works well, please how can i make it that instead of it being called on start it gets called when i call it or push a button. thank you

  • @adrianortiz5224
    @adrianortiz5224 5 месяцев назад

    Why not work for android?

  • @Johnessy
    @Johnessy Год назад

    I am getting 2 errors that i just cant seem to figure out.
    Assembly 'Assets/Plugins/AWSSDK.Polly.dll' will not be loaded due to errors:
    Unable to resolve reference 'System.Threading.Tasks.Extensions'. Is the assembly missing or incompatible with the current platform?

    • @sgt3v
      @sgt3v  Год назад

      You might be using an older version of Unity or .net that does not have `System.Threading.Tasks.Extensions` library. You might need to download the DLL here docs.aws.amazon.com/sdk-for-net/v3/developer-guide/unity-special.html in the list

  • @user-su6fs3ug9b
    @user-su6fs3ug9b 10 месяцев назад

    How do I make him speak Arabic?

  • @user-su6fs3ug9b
    @user-su6fs3ug9b 10 месяцев назад

    What do I write in the script to make him speak Arabic?

  • @shadaaan
    @shadaaan Год назад

    Assets\tts.cs(18,56): error CS0103: The name 'RegionEndpoint' does not exist in the current context
    i am getting this error, installed the plugins but still.

    • @sgt3v
      @sgt3v  Год назад

      You need to pick the region that is assigned in your AWS account.

  • @lsqnet
    @lsqnet Год назад +1

    Hi, Does this support Unity WebGL or WebXR?

    • @Nnadi_II
      @Nnadi_II 9 месяцев назад

      @sarge please

  • @siliwang6180
    @siliwang6180 Год назад

    Thank you for the guide. But I have problem when I build Android apk. The polly works well in the editor and PC application. But the Android doesn't work. Do you have the same issue?

    • @sgt3v
      @sgt3v  Год назад

      Hi, do you get any error messages? You could import the Android LogCat package and see if any Unity errors appear when making a request.

    • @elmehdidair
      @elmehdidair 5 месяцев назад

      you find the solution

    • @seancoyle6920
      @seancoyle6920 Месяц назад

      Try “development build” under build settings

  • @JaceC70
    @JaceC70 Год назад

    Great example, thank you! Is this likely to work on iOS? - I failed so far but do have it working on the Mac.

    • @sgt3v
      @sgt3v  Год назад

      Unfortunately I do not have a Mac and iPhone in my possession so I wont be able to test.

    • @JaceC70
      @JaceC70 Год назад +1

      @@sgt3v thanks for getting back to me. I guess it’s down to the Amazon DLL support for AOT compilation. I’ll do some investigation and report back for anyone else trying.

    • @JaceC70
      @JaceC70 Год назад

      I did manage to get it working on the iPhone. I'm embarrassed to admit I forgot to set [Application uses Wi-Fi] to YES and you'll also need to add [Wi-Fi] in the [Required device capabilities] in the Info.Plist. Finally, I also needed to add s link.xml file that contains:

      Without this, I was seeing "MissingMethodException: Method not found: 'Default constructor not found...ctor() of Amazon.Util.Internal.PlatformServices.NetworkReachability'." in the Xcode console. Hope it helps someone else trying the same.
      In short, Sarge's great demo works on the iPhone. Thank you, Sarge!

    • @sgt3v
      @sgt3v  Год назад +1

      @@JaceC70 Glad to hear that it worked! I'm sure your finding will help other who encountered the same issue, thank you!

  • @taniazaheer3271
    @taniazaheer3271 Год назад

    Great Video. Successfully made Aws account by following your instructions. However, I implemented the same TextToSpeech code but it doesn't work on my side. Whenever I drag the textToSpeech script in the inspector, it doesn't contain audio source in it :( Kindly help me out to fix this issue.

    • @sgt3v
      @sgt3v  Год назад

      Around 26:43 I add the audioSouce as a exposed private field, maybe you missed that part?

    • @taniazaheer3271
      @taniazaheer3271 Год назад

      ​@@sgt3v No, I even added that part as well. Would you mind looking at your Instagram message requests? I have mentioned the complete details of the error that I am facing and I even sent you the screen shots of my code there. Kindly help me out

    • @taniazaheer3271
      @taniazaheer3271 Год назад

      @@sgt3v would you be kind enough to share the whole unity file with me? 🥺

  • @user-mt3ds6lc1e
    @user-mt3ds6lc1e 10 месяцев назад

    can i use this in webGL?

  • @fofoasiri404
    @fofoasiri404 10 месяцев назад

    How talk arabic😢

  • @alokdubey3052
    @alokdubey3052 Год назад

    Hi , can you suggest me any open source tts for unity3d.

    • @sgt3v
      @sgt3v  Год назад

      There is none that good that I know of.

  • @srijana6016
    @srijana6016 Год назад

    how to integrate with this to chat gpt response

    • @sgt3v
      @sgt3v  Год назад +1

      Hi, I will make a video for that this weekend.

    • @sgt3v
      @sgt3v  Год назад

      Hi Priyam, I make the videos whenever I fnd the time, probably I will work on it in the weekend but can't promise.

  • @dionysoft
    @dionysoft Год назад

    birşey sorcam hocam madem bu kadar iyisin c# da unity de bayada bilgili ve kendini geliştirmişssin neden diğerleir gibi bir oyun yapıp parayı kırmıyorsun

    • @sgt3v
      @sgt3v  Год назад +1

      Ahaha zaten calistigim cok iyi bir isim ve projem var, konu iyi oyun ya da kotu oyun cikarmak. Hizlica kendime yakistirmayacagim kotu bir oyun cikarmak mantikli buldugum bir fikir degil. Prensip ve felsefe meselesi. Istanbul depremini dusun, kendine muteahit diyen bir suru insan bina yapti ve yikildi o binalar, ben de uzerine derinlemesine dusunup vakit harcayamayacagim bir ise girmeyi dusunmem, onemli olan urunun benim istedigim kalitede olmasi.

    • @dionysoft
      @dionysoft Год назад

      @@sgt3v cidden zaman ayırıp bu uzun mesajı örneklerle anlatman bile beni mutlu etti çok güzel özetledin cidden fakat bir soru daha sormak istiyorum kardeşin olarak hocam senden yaşca küçüğüm biliyorum bende dijital oyun tasarımı okuyorum türkiyede sence bir şirkette çalışarak da refah seviseyinde gelirler kazanılabilirmi bu sektörde bir oyunla patlamadığın sürece hocam teşekkürler şimdiden

    • @sgt3v
      @sgt3v  Год назад +1

      @@dionysoft Malesef senin benim gibi insanlara hersey altin tepside gelmiyor, calisip ogrenip kendini gelistirip bir yandan da kendin icin birseyler yaparak donguyu kirmaya calisabilirsin. Aniden zengin olman gerekmiyor. Kendini hem profesyonel alaninda hem de sosyal alanda gelistirirsen herhangi bir sirkette aranan ve deger goren kisi olabilirsin. Biraz zaman ve emek isteye bir surec ama kendine saygini ve inancini da arttiran bir surec.

    • @dionysoft
      @dionysoft Год назад

      @@sgt3v teşekkürler hocam 💕

  • @user-su6fs3ug9b
    @user-su6fs3ug9b 10 месяцев назад

    How do I make him speak Arabic?