Code Monkey home page Code Monkey logo

gruut-ipa's Introduction

Rhasspy Voice Assistant

Rhasspy 2.5 logo

Rhasspy (ˈɹæspi) is an open source, fully offline set of voice assistant services for many human languages that works well with:

You specify voice commands in a template language:

[LightState]
states = (on | off)
turn (<states>){state} [the] light

and Rhasspy will produce JSON events that can trigger action in home automation software, such as a Node-RED flow:

{
    "text": "turn on the light",
    "intent": {
        "name": "LightState"
    },
    "slots": {
        "state": "on"
    }
}

Rhasspy is optimized for:

Learn More

Web Interface

Rhasspy comes with a snazzy web interface that lets you configure, program, and test your voice assistant remotely from your web browser. All of the web UI's functionality is exposed in a comprehensive HTTP API.

Test page in web interface

Getting Started

Ready to try Rhasspy? Follow the steps below or check out the Getting Started Guide.

  1. Make sure you have the necessary hardware
  2. Choose an installation method
  3. Access the web interface to download a profile
  4. Author your custom voice commands and train Rhasspy
  5. Connect Rhasspy to other software like Home Assistant or a Node-RED flow by:

Getting Help

If you have problems, please stop by the Rhasspy community site or open a GitHub issue.

Supported Languages

Rhasspy supports the following languages:

Services

As of version 2.5, Rhasspy is composed of independent services that coordinate over MQTT using a superset of the Hermes protocol.

Rhasspy services

You can easily extend or replace functionality in Rhasspy by using the appropriate messages. Many of these messages can be also sent and received over the HTTP API and the Websocket API.

Intended Audience

Rhasspy is intended for savvy amateurs or advanced users that want to have a private voice interface to their chosen home automation software. There are many other voice assistants, but none (to my knowledge) that:

  1. Can function completely disconnected from the Internet
  2. Are entirely free/open source with a permissive license
  3. Work well with freely available home automation software

If you feel comfortable sending your voice commands through the Internet for someone else to process, or are not comfortable customizing software to handle intents, I recommend taking a look at Mycroft.

Contributing

Community contributions are welcomed! There are many different ways to contribute, both as a developer and a non-developer.

Open source


Development Status

The various repositories also have their own issue tracker to follow and discuss development of these specific components. Here's the status of all repositories:

Repository Tests Open issues Open pull requests
rhasspy Tests Open issues Open pull requests
rhasspy-asr Tests Open issues Open pull requests
rhasspy-asr-deepspeech Tests Open issues Open pull requests
rhasspy-asr-deepspeech-hermes Tests Open issues Open pull requests
rhasspy-asr-kaldi Tests Open issues Open pull requests
rhasspy-asr-kaldi-hermes Tests Open issues Open pull requests
rhasspy-asr-pocketsphinx Tests Open issues Open pull requests
rhasspy-asr-pocketsphinx-hermes Tests Open issues Open pull requests
rhasspy-client Tests Open issues Open pull requests
rhasspy-dialogue-hermes Tests Open issues Open pull requests
rhasspy-fuzzywuzzy Tests Open issues Open pull requests
rhasspy-fuzzywuzzy-hermes Tests Open issues Open pull requests
rhasspy-hermes Tests Open issues Open pull requests
rhasspy-hermes-app Tests Open issues Open pull requests
rhasspy-homeassistant-hermes Tests Open issues Open pull requests
rhasspy-microphone-cli-hermes Tests Open issues Open pull requests
rhasspy-microphone-pyaudio-hermes Tests Open issues Open pull requests
rhasspy-nlu Tests Open issues Open pull requests
rhasspy-nlu-hermes Tests Open issues Open pull requests
rhasspy-profile Tests Open issues Open pull requests
rhasspy-python-template Tests Open issues Open pull requests
rhasspy-rasa-nlu-hermes Tests Open issues Open pull requests
rhasspy-remote-http-hermes Tests Open issues Open pull requests
rhasspy-server-hermes Tests Open issues Open pull requests
rhasspy-silence Tests Open issues Open pull requests
rhasspy-snips-nlu Tests Open issues Open pull requests
rhasspy-snips-nlu-hermes Tests Open issues Open pull requests
rhasspy-speakers-cli-hermes Tests Open issues Open pull requests
rhasspy-supervisor Tests Open issues Open pull requests
rhasspy-tag-action Tests Open issues Open pull requests
rhasspy-tts-cli-hermes Tests Open issues Open pull requests
rhasspy-update-repo-action Tests Open issues Open pull requests
rhasspy-wake-pocketsphinx-hermes Tests Open issues Open pull requests
rhasspy-wake-porcupine-hermes Tests Open issues Open pull requests
rhasspy-wake-precise-hermes Tests Open issues Open pull requests
rhasspy-wake-raven Tests Open issues Open pull requests
rhasspy-wake-raven-hermes Tests Open issues Open pull requests
rhasspy-wake-snowboy-hermes Tests Open issues Open pull requests

gruut-ipa's People

Contributors

mbarnig avatar synesthesiam avatar zingblue 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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

gruut-ipa's Issues

cannot reproduce Zamia lexicon.txt entries

Hi Michael,

I've been experimenting with gruut-ipa and Zamia lexicon.txt from the popular models 'kaldi-generic-de-tdnn_250-r20190328' and ''kaldi-generic-en-tdnn_250-r20190609" and I'm having trouble getting the expected results.
As far as I understand Zamias lexicon.txt: is in sampa format, so I selected two words from the German file:

hallo --> h '{ l @ U
welt --> v 'E l t

and then used espeak-ng to generate phonems:

# espeak IPA phonems:
espeak-ng -v de -x -q --sep=" " --ipa "hallo"
h ˈa l oː
espeak-ng -v de -x -q --sep=" " --ipa "welt"
v ˈɛ l t

# espeak default phonems:
h 'a l o:
v 'E l t

Finally I've tried to convert the espeak results to sampa with gruut-ipa:

python3 -m gruut_ipa convert ipa sampa "h ˈa l oː"
h "a l o:

python3 -m gruut_ipa convert espeak sampa "h 'a l o:"
h "a 5 o:

python3 -m gruut_ipa convert ipa sampa "v ˈɛ l t"
v "E l t

python3 -m gruut_ipa convert espeak sampa "v 'E l t"
v "E 5 t

But none of the results matches the lexicon.txt entries.
Any help or hints would be appreciated! :-)

Exclude tests in setuptools.find_packages

I'm currently packaging larynx + deps for Arch Linux and I encountered an issue with gruut-ipa: setuptools includes the tests in the package, which does not play well with Arch Linux packaging - see rhasspy/phonemes2ids#1 for details.

I propose the following patch:

--- a/setup.py  2021-11-11 20:26:11.000000000 +0100                                                                                                                                                               
+++ b/setup2.py 2022-01-11 01:13:56.813670352 +0100
@@ -36,7 +36,7 @@
     author="Michael Hansen",
     author_email="[email protected]",
     url="https://github.com/rhasspy/gruut-ipa",
-    packages=setuptools.find_packages(),
+    packages=setuptools.find_packages(exclude=['tests']),
     package_data={"gruut_ipa": data_files + ["py.typed"]},
     install_requires=requirements,
     extras_require={':python_version<"3.7"': "dataclasses"},

r\ converted as \u0270\u0329

There is an issue when we convert r\ from sampa to ipa. I'd expect it to be ɹ, but we get ɰ̩ instead.
The issues is that when we construct SAMPA_TO_IPA dictionary, we reverse the IPA_TO_SAMPA one, but we have r\ as a value twice in it, so it get's rewritten.

"\u0270\u0329": "r\\",

python interpreter

Hello, I'm trying to use gruut-ipa 0.10.0 on Windows 10 and Python 3.9.
I need to group phones into phonemes for English:

$ python3 -m gruut_ipa phonemes en-us "/dʒʌst ə kaʊ/"
d͡ʒ ʌ s t ə k aʊ

How would this look in the python interpreter? I've tried

>>> import gruut_ipa
>>> help(gruut_ipa.Phonemes)

But I couldn't find an answer there.

Consonant descriptions missing manner

Hi,

I recently stumbled on this project and I have to say I'm quite impressed. It's a fresh take on all the other projects related to IPA in Python. Keep it up!

One thing I noticed while playing around was that in the consonant descriptions, we don't see the manner of articulation, neither from the command line nor when calling it from code. For example:

## command line
python -m gruut_ipa describe 'f' | jq .
{
  "text": "f",
  "letters": "f",
  "tone": "",
  "tones": [],
  "accents": [],
  "stress": "",
  "type": "Consonant",
  "place": "labio-dental",
  "voiced": false,
  "nasalated": [],
  "raised": [],
  "elongated": false
}

## from python script
gruut_ipa.Phoneme('f').to_dict()
{'text': 'f',
 'letters': 'f',
 'tone': '',
 'tones': [],
 'accents': [],
 'stress': '',
 'type': 'Consonant',
 'place': 'labio-dental',
 'voiced': False,
 'nasalated': [],
 'raised': [],
 'elongated': False}

I can tell the information is there if I call the consonant object, it just seems like the information is lost when converting this object to the dict/json output.

gruut_ipa.Phoneme('f').consonant
Consonant(ipa='f', type=<ConsonantType.FRICATIVE: 'fricative'>, place=<ConsonantPlace.LABIO_DENTAL: 'labio-dental'>, voiced=False, velarized=False, sounds_like=<ConsonantSoundsLike.NONE: ''>, length=<PhonemeLength.NORMAL: 'normal'>, alias_of=None)

I think it has to do with the code in the main file calling for the 'type' of the consonant object, but I'm not in a position to debug it at the moment. The internal type is fricative and the python type is Consonant. This could be fixed by example by referring to the consonant 'type' as the consonant 'manner', which is in line with IPA standards.

Looking forward to your feedback. Thanks again for the awesome tool!

Question about a conversion

Hi,

I'm coming in from using coqui, but I realize this is a gruut issue more than a coqui issue, so here's my question -

For the following text - 'In the news today - Afghanistan, COVID 19, Corona Virus, Australia, India, and the USA.'

I ran the following command and got the below phonemes -

> echo 'In the news today - Afghanistan, COVID 19, Corona Virus, Australia, India, and the USA.' | python3 -m gruut en-us tokenize | python3 -m gruut en-us phonemize | jq -c ".pronunciation_text"
"ˈɪ n ð ə n j ˈu z t ə d ˈeɪ æ f ɡ ˈæ n ɪ s t ˌæ n | k ˈoʊ v ɪ d n ˈaɪ n t ˈi n | k ɚ ˈoʊ n ə v ˈaɪ ɹ ə s | ɔ s t ɹ ˈeɪ l j ə | ˈɪ n d i ə | ˈæ n d ð ə ˌʌ s ə ‖"

From what I can see, the translation for "USA" is wrong and for corona virus is iffy, at best. Coqui ends up speaking "USA" as "you-sa" (with [sa] as in [sardonic]) instead of individual letters "U", "S", "A".

How can I fix this? Is there some text cleanup I can do? I tried passing "U S A" with spaces but that doesn't fare so well either.

I face the same problem with saying "AWS", because it translates it as "ɔ z".

I can see that this is based on the phonemes text file here - https://github.com/rhasspy/gruut-ipa/blob/master/gruut_ipa/data/en-us/phonemes.txt

ɔ l[aw] ɔː ɒ

Again, splitting it up doesn't help. Could you tell me if I can do something to get gruut to acknowledge that these are individual letters that need to be spoken out exactly as they are written?

Palatalized consonants as separate phone

I'm trying to use your awesome library for some language investigation, and faced with a problem with palatalized consonants.

Your library thinks about ʲ (\u02B2, IPA number 421) as about separate phone. But as far as I understand it should be thought as diacritic symbol that marks base consonant as palatalized one. So correct output for
>>> Pronunciation.from_string('konʲ').phones
is not
[k, o, n, ʲ]
but
[k, o, nʲ]

Kindly let me know if my assumption is correct (I'm not a linguist, and probably understand IPA in a wrong way), and I'll make you a pull request to fix that.

Please tag releases on Git

Hi, thanks for working on everything Rhasspy, much appreciated.

If you could use Git tags on this repository to publish new versions we could better reference and update this package in downstream Linux distros.

Thanks for considering!

some German phonemes are off

gruut-ipa phonemes de-de "lecken"
gives "l eː ç k eː n", however, "ck" is one sound "k" here.

gruut-ipa phonemes de-de "Straße"
gives "S t ʁ a ß e", however, "a" in "Straße" is long (i.e. "a:").

missing phones from English?

From my understanding there should be at least one phone for each phoneme in English of which there are supposed ot be 44 phonemes so presumably at least 44 phones. When I do gruut-ipa print --language en-gb I get 33 phones (and 36 for en-us)? The phoneme data files have 42 and 40 phonemes respectively?

Also, the phones command doesn't seem to handle dipthong vowels at all, splitting them up into two phones?

What am I missing here?

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.