Giter Site home page Giter Site logo

pxt-speech's Introduction

pxt-speech (Billy)

This is a MakeCode extension based on a port of SAM by Sebastian Macke.

Original version of Billy is by Adam Granger: https://github.com/adamish/pxt-billy

SAM "Software Automatic Mouth" itself is a legendary text to speech algorithm from 1982 for the Commodore C64

Add to a MakeCode Project

This repository can be added as an extension in MakeCode.

Examples

Basic usage

input.onButtonPressed(Button.A, function () {
    billy.say("Hello World")
})
input.onButtonPressed(Button.B, function () {
    billy.voicePreset(VoicePreset.DALEK)
    billy.say("I am a DALEK - EXTERMINATE")
})

The voice can be configured with individual values for speed, pitch, throat and mouth Each value is in the range of 0 to 255

  • speed - how quickly the voice talks - low value slow, high value fast
  • pitch - how high or low the voice sounds
  • throat - how relaxed or tense is the tone of voice
  • mouth - how tight-lipped the voice sounds
input.onButtonPressed(Button.A, function () {
    billy.configureVoice(92, 60, 190, 190);
    billy.say("I am a robot")
})

Advanced pronounciation can be achieved with direct use of phonemes

See original SAM manual for full details of the syntax

input.onButtonPressed(Button.A, function () {
    billy.pronounce("/HEHLOW WERLD")
})

Supported targets

  • for PXT/microbit

(The metadata above is needed for package search, update it with the targets you support)

Acknowledgements

License

MIT

Links

pxt-speech's People

Contributors

obzbit avatar adamish 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.