Code Monkey home page Code Monkey logo

stevecox1964 / amazon-polly-metahumans-steve Goto Github PK

View Code? Open in Web Editor NEW

This project forked from aws-samples/amazon-polly-metahumans

49.0 4.0 15.0 315 KB

This Unreal Engine sample project demonstrates how to bring Epic Games' MetaHuman digital characters to life using the Amazon Polly text-to-speech service from AWS. Use this project as a starting point for creating your own Unreal Engine applications that leverage Amazon Polly to give voice to your MetaHumans.

License: MIT No Attribution

C++ 73.67% C 4.17% C# 4.89% Python 15.23% Batchfile 0.10% HTML 1.94%

amazon-polly-metahumans-steve's Introduction

Amazon Polly & MetaHumans Sample Project

NOTES:

-- You have to have an active AWS account
-- This works for Unreal Engine 4.27 "only"
-- Install Visual Studio 2019 for C++/Games development
-- If using google speech to text then an active google api account
-- Install cmake 3.18.0.rc1
-- Install "dotNet" component located here ----> https://dotnet.microsoft.com/en-us/download/dotnet/thank-you/sdk-6.0.408-windows-x64-installer
-- Change your "Config/DefaultEditorSettings.ini" to use Visual Studio 2019 like so
----- [/Script/SourceCodeAccess.SourceCodeAccessSettings]
----- PreferredAccessor=VisualStudio
-- Run batch file located at ----> Source/AmazonPollyMetaHuman/ThirdParty/AwsSdk/BuildAwsSdkWin64.bat
-- Right click Unreal project and select "Build VS project files"
-- Once VS "solution file -- *.sln" apears, load VS solution and select main menu ->Build->Rebuild Solution
-- Wait till done building
-- Load aws polly project

A sample project combining Epic Games' MetaHuman digital characters with Amazon Polly text-to-speech.

This Unreal Engine sample project demonstrates how to bring Epic Games' MetaHuman digital characters to life using the Amazon Polly text-to-speech service from AWS. Use this project as a starting point for creating your own Unreal Engine applications that leverage Amazon Polly to give voice to your MetaHumans using one of 16 different English language voices spanning 5 dialects. Or extend this project to use any of Polly's 60+ voices covering 20+ languages and 13+ dialects.

Polly.MetaHuman.1080p.mov

With Amazon Polly, you only pay for what you use. You are charged based on the number of characters of text that you convert either to speech audio or to speech metadata. In addition, you can cache and replay Amazon Pollyโ€™s generated speech at no additional cost. For full pricing details, see Amazon Polly Pricing.

Contents

Quick Start

๐Ÿ›‘ Before proceeding you must have Unreal Engine 4.26 or 4.27 installed as well as the Microsoft Visual Studio development tools required for UE4 C++ development (Windows) or the Xcode development tools (Mac). If you need help with these setup steps, refer to the Unreal Engine 4 documentation, especially "Setting Up Visual Studio for Unreal Engine". Disclaimer: This was only tested with Visual Studio 2019 with UE4.26, although with slight modifications to the build script it should work with Visual Studio 2022 as well. I couldn't get this to work with UE5.

1. Create AWS credentials for the project

In order for this Unreal Engine project to interact with the Amazon Polly service, you must provide it with AWS credentials that allow access to that service. The easiest way to generate these credentials is to create a new AWS Identity Access & Management (IAM) user in your AWS account.

Create a new IAM user and assign to it the permissions policy named "AmazonPollyReadOnlyAccess". Although the name you give this user is not important, we suggest naming it "MetaHumans Sample" or something equally distinctive. Be sure to save the Access Key ID and the Secret Access Key that are generated during the user creation process. You'll need them later.

๐Ÿ’ก Tip: For more help, see "Creating an IAM user in your AWS account" in the AWS IAM documentation.

2. Install and configure the AWS Command Line Interface

You will need to configure your local computer to communicate with AWS services using the credentials you created above. The easiest way to do this is to install and configure the AWS Command Line Interface (AWS CLI).

Install the AWS CLI to your local computer following these instructions.

Use the aws configure command to create a default profile for the AWS CLI. Be sure to use the Access Key ID and Secret Access Key values you saved above.

๐Ÿ’ก Tip: For more help, see "Configuration basics" in the AWS CLI documentation.

3. Compile the Polly C++ SDK

๐Ÿ›‘ This next step requires cmake and git. If you don't already have cmake installed, you can download it here. After you download cmake, launch cmake and click 'Tools' -> 'How To Install For Command Line Use' and follow one of the instructions. E.g. for Mac - One may add CMake to the PATH: PATH="/Applications/CMake.app/Contents/bin":"$PATH"

This project makes use of the C++ Polly API โ€“ a part of the AWS SDK for C++ โ€“ to communicate with the Polly service. We've provided scripts to automatically download and compile the appropriate binaries for you. Run one of the following scripts:

Windows: Source/AmazonPollyMetaHuman/ThirdParty/AwsSdk/BuildAwsSdkWin64.bat

Mac: Source/AmazonPollyMetaHuman/ThirdParty/AwsSdk/BuildAwsSdkMac.sh

4. Open the Unreal Engine project

Open the project by double-clicking on the AmazonPollyMetaHuman.uproject file.

Click "Yes" on the dialog that appears.

Module compile prompt

5. Run the project

To try out the project, simply click the "Play" button in the Unreal Engine editor. The MetaHuman will come alive using speech and lip sync generated by Amazon Polly. After the MetaHuman stops speaking you can enter your own custom speech text into the on-screen text field.

Play button

โš ๏ธ Wait until the "Compiling Shaders" process completes before running this project for the first time.

"Compiling Shaders" message

๐Ÿ›  Troubleshooting: This project includes extensive error messaging that can help you debug common problems. If the project doesn't work properly, open the Output Log tab in the Unreal Engine editor and look for error messages.

Developer Guide

This repository includes a full Developer Guide which describes the project's architecture and explains how to customize the project with your own MetaHuman characters.

Getting Help

If you have questions as you explore this sample project post them to the Issues section of this repository. To report bugs, request new features, or contribute to this open source project see CONTRIBUTING.md.

Security

See CONTRIBUTING for more information.

License

This sample code is licensed under the MIT-0 License. See the LICENSE file.

amazon-polly-metahumans-steve's People

Contributors

cwalkere avatar kris-work avatar krxtopher avatar stevecox1964 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.