Giter VIP home page Giter VIP logo

cosmincatalin / voice-recognition-with-mxnet-and-sagemaker Goto Github PK

View Code? Open in Web Editor NEW
6.0 2.0 1.0 63 KB

End to end AWS SageMaker application for detecting the AWS Polly voice in an audio recording using Gluon and MXNet.

Home Page: https://cosminsanda.com/posts/voice-recognition-with-mxnet-and-sagemaker/

Jupyter Notebook 76.53% Python 23.47%
machine-learning apache-mxnet mxnet gluon sagemaker jupyter-notebook aws data-science voice-detection polly-voice audio audio-analysis

voice-recognition-with-mxnet-and-sagemaker's Introduction

Voice Detection with MXNet and SageMaker

This application supports an article on my blog where I present how to build this application step by step. Full description and documentation can be found there.

Note

A run-it-on-your-own-machine version of this repository is available over here: https://github.com/cosmincatalin/dtu-voice-recognition-talk. The repo was used live in a demo at Danmarks Tekniske Universitet.

voice-recognition-with-mxnet-and-sagemaker's People

Contributors

cosmincatalin avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

rpj911

voice-recognition-with-mxnet-and-sagemaker's Issues

Sagemaker

Hey, is it possible to do the final step, so to see the results and test your data without sagemaker?
Could you explain to us what your code does:

for directory in listdir("data/test"):
    batch = []
    cnt = 0
    total = 0
    detected = 0
    for file in listdir("data/test/{}".format(directory)):
        with open("data/test/{}/{}".format(directory, file), "rb") as audio_file:
            batch.append(base64.b64encode(audio_file.read()).decode("utf-8"))
            cnt += 1
            if cnt == 5:
                binary_json = json.dumps(batch).encode("utf-8")
                response = sagemaker_runtime_client.invoke_endpoint(
                    EndpointName=predictor.endpoint,
                    Body=binary_json,
                    ContentType="application/json",
                    Accept="application/json"
                )["Body"].read()
                individual_predictions = json.loads(response, encoding="utf-8")
                for prediction in individual_predictions:
                    total += 1
                    if prediction == directory:
                        detected += 1
                cnt = 0
                batch = []
    print("""Recordings with {}:
        Total: {}
        Detected: {}
        Accuracy: {:0.2f}
    """.format(directory, str(total), str(detected), detected/total))

And how we could get the same results without sagemaker?

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.