All Projects โ†’ zakaton โ†’ Pink Trombone

zakaton / Pink Trombone

Licence: gpl-3.0
A programmable version of Neil Thapen's Pink Trombone

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Pink Trombone

Gophergameserver
๐Ÿ† Feature packed, easy-to-use game server API for Go back-ends and Javascript clients. Tutorials and examples included!
Stars: โœญ 61 (+12.96%)
Mutual labels:  api, voice
talkie
Text-to-speech browser extension button. Select text on any web page, and have the computer read it out loud for you by simply clicking the Talkie button.
Stars: โœญ 43 (-20.37%)
Mutual labels:  voice, speech-synthesis
Naomi
The Naomi Project is an open source, technology agnostic platform for developing always-on, voice-controlled applications!
Stars: โœญ 171 (+216.67%)
Mutual labels:  speech-synthesis, voice
spokestack-android
Extensible Android mobile voice framework: wakeword, ASR, NLU, and TTS. Easily add voice to any Android app!
Stars: โœญ 52 (-3.7%)
Mutual labels:  voice, speech-synthesis
Java Speech Api
The J.A.R.V.I.S. Speech API is designed to be simple and efficient, using the speech engines created by Google to provide functionality for parts of the API. Essentially, it is an API written in Java, including a recognizer, synthesizer, and a microphone capture utility. The project uses Google services for the synthesizer and recognizer. While this requires an Internet connection, it provides a complete, modern, and fully functional speech API in Java.
Stars: โœญ 490 (+807.41%)
Mutual labels:  api, speech-synthesis
Api
ๅงฌ้•ฟไฟกAPI For Docker ไธ€ไธชๅŸบไบŽๅคš็ง็ผ–็จ‹่ฏญ่จ€ๅผ€ๆบๅ…่ดนไธ้™ๅˆถๆไพ›็”Ÿๆดปๅธธ็”จ,ๅ‡บ่กŒๆœๅŠก,ๅผ€ๅ‘ๅทฅๅ…ท,้‡‘่žๆœๅŠก,้€š่ฎฏๆœๅŠกๅ’Œๅ…ฌ็›Šๅคงๆ•ฐๆฎ็š„ๅนณๅฐ.
Stars: โœญ 743 (+1275.93%)
Mutual labels:  api, voice
voder
An emulation of the Voder Speech Synthesizer.
Stars: โœญ 19 (-64.81%)
Mutual labels:  speech-synthesis, web-audio
Disgord
Go module for interacting with the documented Discord's bot interface; Gateway, REST requests and voice
Stars: โœญ 277 (+412.96%)
Mutual labels:  api, voice
Twilio Java
A Java library for communicating with the Twilio REST API and generating TwiML.
Stars: โœญ 371 (+587.04%)
Mutual labels:  api, voice
Twilio Csharp
Twilio C#/.NET Helper Library for .NET Framework 3.5+ and supported .NET Core versions
Stars: โœญ 541 (+901.85%)
Mutual labels:  api, voice
Africastalking Java
Official Java SDK
Stars: โœญ 27 (-50%)
Mutual labels:  api, voice
Gopay Php Api
GoPay's PHP SDK for Payments REST API
Stars: โœญ 53 (-1.85%)
Mutual labels:  api
Trueopenvr Core
Core, docs
Stars: โœญ 52 (-3.7%)
Mutual labels:  api
Coolapk Uwp
้…ทๅฎ‰็š„UWP็‰ˆ็ฌฌไธ‰ๆ–นๅฎขๆˆท็ซฏใ€‚ใ€‚
Stars: โœญ 52 (-3.7%)
Mutual labels:  api
Doorman
Doorman is an authorization (micro)service.
Stars: โœญ 52 (-3.7%)
Mutual labels:  api
Simple Salesforce
A very simple Salesforce.com REST API client for Python
Stars: โœญ 1,072 (+1885.19%)
Mutual labels:  api
Rest Api Example
RESTful Blog API in Lumen 5.2
Stars: โœญ 53 (-1.85%)
Mutual labels:  api
Cs224n Gpu That Talks
Attention, I'm Trying to Speak: End-to-end speech synthesis (CS224n '18)
Stars: โœญ 52 (-3.7%)
Mutual labels:  speech-synthesis
Ar Gif
Easy to use augmented reality web components
Stars: โœญ 52 (-3.7%)
Mutual labels:  web-component
Sechub
SecHub - one central and easy way to use different security tools with one API/Client
Stars: โœญ 52 (-3.7%)
Mutual labels:  api

Fabien
Sound is generated in the glottis (at the bottom left), then filtered by the shape of the vocal tract. The voicebox controls the pitch and intensity of the initial sound - Neil Thapen

๐Ÿ—ฃ๏ธ Pink Trombone - Bare-handed Speech Synthesis

A programmable version of Neil Thapen's famous and wonderful Pink Trombone

๐Ÿ“š Table of Contents

๐Ÿ“ฆ Setting Up

๐Ÿ‘„ Producing Sound

๐Ÿ‘€ Enabling and Disabling the UI

๐ŸŽ›๏ธ Audio Parameters

๐ŸŽบ Manipulating Vocal Tract Constrictions

๐Ÿ‘… Common Phonemes

๐Ÿ† Developer Showcase

๐Ÿ™ Developer Wishlist

๐Ÿ“– Bibliography

๐Ÿ“ฆ Setting Up

  1. Save a local copy of pink-trombone.min.js and pink-trombone-worklet-processor.min.js and make sure they're both in the same relative location (the first will import the other as a Audio Worklet Processor)

  2. In your HTML <head></head> element, insert the file in a script element as a module:

<script src="pink-trombone.min.js" type="module"></script>
  1. In your HTML <body></body> element, insert the following custom element:
<pink-trombone></pink-trombone>
  1. In your JavaScript code, grab the <pink-trombone></pink-trombone> element:
var pinkTromboneElement = document.querySelector("pink-trombone");
  1. Add a load eventListener to the pinkTromboneElement element:
pinkTromboneElement.addEventListener("load", myCallback);
  1. In the "load" callback, assign an Audio Context using .setAudioContext(myAudioContext) (if none is specified, an Audio Context instance is created for you):
function myCallback(event) {
  pinkTromboneElement.setAudioContext(myAudioContext)
}

This method returns a Promise once the AudioWorkletProcessor module is loaded.

  1. In the promise resolution, a Pink Trombone audio node is created, which you can connect to other audio nodes from the scope of the <pink-trombone></pink-trombone> element:
function myCallback(event) {
  pinkTromboneElement.setAudioContext(myAudioContext)
    .then(() => {
      const audioContext = pinkTromboneElement.audioContext
      pinkTromboneElement.connect(audioContext.destination);
    });
}

๐Ÿ‘„ Producing Sound

๐Ÿ˜ƒ To start generating sound, run the .start() method:

pinkTromboneElement.start();

๐Ÿค To stop generating sound, run the .stop() method:

pinkTromboneElement.stop();

๐Ÿ‘€ Enabling and Disabling the UI

๐Ÿ™‚ To show the interactive visualization:

pinkTromboneElement.enableUI();

โœ๏ธ To start animating the visualization:

pinkTromboneElement.startUI();

๐Ÿ›‘ To stop animating the visualization:

pinkTromboneElement.stopUI();

๐Ÿ˜Š To hide the interactive visualization:

pinkTromboneElement.disableUI();

๐ŸŽ›๏ธ Audio Parameters

The audio parameters of the Pink Trombone audio node can be accessed from the <pink-trombone></pink-trombone> element's scope:

๐ŸŽš๏ธ Intensity

pinkTromboneElement.intensity;

๐ŸŽต Frequency

pinkTromboneElement.frequency;

๐Ÿ‘„ Tenseness

pinkTromboneElement.tenseness;

๐Ÿ“ข Loudness

pinkTromboneElement.loudness;

ใ€ฐ๏ธ Vibrato

pinkTromboneElement.vibrato.frequency;
pinkTromboneElement.vibrato.gain;
pinkTromboneElement.vibrato.wobble;

๐Ÿ‘… Tongue

// 'index' and 'diameter' refer to the tongue's location in the mouth
pinkTromboneElement.tongue.index;
pinkTromboneElement.tongue.diameter;

To change the voiceness between voiced and voiceless, change the .tenseness and .loudness audio parameters as follows:

function setVoiceness(voiceness) {
  const tenseness = 1 - Math.cos((voiceness) * Math.PI * 0.5);
  const loudness = Math.pow(tenseness, 0.25);
  
  pinkTromboneElement.tenseness.value = tenseness;
  pinkTromboneElement.loudness.value = loudness;
}

// voiced
setVoiceness(1);

// voiceless
setVoiceness(0);

Later on I may add a .voiceness audio parameter that automates this - for now I'm just adopting the original version

๐ŸŽบ Manipulating Vocal Tract Constrictions

Vocal Tract constrictions comprise of an object containing .index and .diameter Audio Parameter properties that are implicitly connected to the Pink Trombone audio node

To add a vocal tract constriction:

var myConstriction = pinkTromboneElement.newConstriction(indexValue, diameterValue);

To set a vocal tract constriction:

myConstriction.index.value = newIndexValue;
myConstriction.diameter.value = newDiameterValue;

To remove a vocal tract constriction:

pinkTromboneElement.removeConstriction(myConstriction);

๐Ÿ‘… Common Phonemes

For reference, here are some preset index & diameter preset values for some phonemes:

๐Ÿ‘… Tongue phonemes:

รฆ [pat]

  • index : 14.93
  • diameter : 2.78

ษ‘ [part]

  • index : 2.3
  • diameter : 12.75

ษ’ [pot]

  • index : 12
  • diameter : 2.05

ษ” [port (rounded)]

  • index : 17.7
  • diameter : 2.05

ษช [pit]

  • index : 26.11
  • diameter : 2.87

i [peat]

  • index : 27.2
  • diameter : 2.2

e [pet]

  • index : 19.4
  • diameter : 3.43

สŒ [put]

  • index : 17.8
  • diameter : 2.46

u [poot (rounded)]

  • index : 22.8
  • diameter : 2.05

ษ™ [pert]

  • index : 20.7
  • diameter : 2.8

๐ŸŽบ Vocal Tract Constriction phonemes: voiced and voiceless consonants share the same values, differing in voiceness

  • Fricatives

    • (ส’, สƒ) ["s" in "pleasure"]

      • index : 31
      • diameter : 0.6
    • (z, s) ["z" in "zoo"]

      • index : 36
      • diameter : 0.6
    • (v, f) ["v" in "very"]

      • index : 41
      • diameter : 0.5
  • Stops

    • (g, k) ["g" in "go"]

      • index : 20
      • diameter : 0
    • (d, t) ["d" in "den"]

      • index : 36
      • diameter : 0
    • (b, p) ["b" in "bad"]

      • index : 41
      • diameter : 0
  • Nasals

    • (ล‹) ["ng" in "hang"]

      • index : 20
      • diameter : -1
    • (n) ["n" in "not"]

      • index : 36
      • diameter : -1
    • (m) ["m" in "woman"]

      • index : 41
      • diameter : -1

๐Ÿ† Developer Showcase

Send us an email at [email protected] if you have a cool application made with our api! Zack
Zack
Zack
Zack
Zack

๐Ÿ™ Developer Wishlist

Our time is limited, so we'd greatly appreciate it if you guys could implement some of these ideas:

  • [ ] IPA Speak n' See ๐Ÿ—ฃ๏ธ๐Ÿ’ฌ - Take input speech from the user using the Media Recording API and approximate their articulation using the Pink Trombone, allowing speakers to visualize how they speak.
  • [ ] Phonetic Voice Editor ๐ŸŽน๐Ÿ‘„โŒจ๏ธ - Create a cross between a Text Editor and a Digita Audio Workstation, where the user can type in phonemes instead of characters, with automation to programmatically adjust the cadence, pitch, and other features over time.
  • [ ] SSML Simulator ๐Ÿ“๐Ÿ’ฌ - Implement a Speech Synthesis Markup Language emulator that can take an utterance and process the speech request using Pink Trombone's audio processing

๐Ÿ“– Bibliography

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].