Giter Club home page Giter Club logo

sc-voice's Introduction

sc-voice

Javascript implemenation of SuttaCentral Voice Assistance (SC-Voice) for vision-impaired. Includes:

Prerequisites

  • Linux Debian 10 or Ubuntu 20.04
  • Nodejs 14.x
  • AWS Polly account (required)

Installation

With a Linux console, install the software:

git clone https://github.com/sc-voice/sc-voice.git
cd sc-voice

Initialization requires super user access for your computer and you will be asked to enter your computer superuser password.

./scripts/init.sh

Now update the content but do not reboot (i.e., Respond with no when asked to reboot)

./scripts/update-latest

As part of installation you will need to configure the AWS Polly TTS service adapter.

Configure Amazon AWS Polly

The Amazon AWS Polly Text-to-Speech service can be used to convert sutta text to speech. To enable AWS Polly, you will need to configure your credentials

Login to your AWS account and go to the IAM dashboard|Delete your root access keys|Manage Security Credentials|Access Keys...|Create New Access Key

aws configure
Launch localhost server
npm start

Open up localhost in your local browser and you will see Voice. When you are done with voice, type CTRL-C in the terminal.

Unit tests

npm run test

Unit tests take about 2 minutes. The unit tests require AWS Polly.

To execute a single unit/test, simply insert the text TESTTEST into the it("...") title argument. Then run npm run test:test, which selectively tests such unit tests whenever a source file changes. This makes quick work of debugging or implementing a feature.

Test failures
  • Some tests validate online APIs and may fail due to timeouts or EAI_AGAIN responses. Re-run tests and they should pass.
  • Some tests validate online content which may change. For example, the number of search results may change slightly. Update the unit tests accordingly and re-run tests.

Scripts

Command line script Description
npm run test Run service unit tests (about 2 minutes).
npm run serve Compile and reload SC-Voice Vue for development at http://localhost:8080
npm run build Create production Vue build in dist folder
npm run lint Run esLint to check *.js and *.vue files `

Other

Directory structure

  • src contains Javascript source code
  • test contains Javascript unit tests
  • scripts contains miscellaneous scripts
  • local contains local content not archived in git
  • public Vue/Vuetify public HTML assets
  • words contains language lexicons for search and speech.

sc-voice's People

Contributors

aminah-sc avatar cuboids avatar dependabot[bot] avatar firepick1 avatar gnlaera avatar kaz-kaz avatar lainath avatar madhu-metta avatar sabbamitta avatar seanlem avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

sc-voice's Issues

Auto-update content

User story

When I use Voice, the content will always match the latest content on SuttaCentral

Feature description (the list of things that need to be done for the ticket to be considered finished):

  • Investigate AWS Lambda compute service

Pre milestone planning check:

  • Small enough to completed in a milestone.
  • Dependencies marked
  • No external dependencies block this from being completed.
  • Details are understood by dev team so they know what needs to be done and can determine if it can be completed.

Logo adjustments

Description

Target size matters! As described in the linked article small link areas can be tough for people with difficulties with coordination and fine motor skills. Others, eg the chubby fingered, can also struggle with small links.

Additionally, the text of SCV title is not aligns differently on different browsers/OSs:

Chrome, Ubuntu:
image.png

Chromium, Ubuntu:
image.png

FF, Ubuntu

image.png

FF, Mint
image.png

Acceptance criteria

  • aligned "SuttaCentral Voice" title align consistently on all browsers
  • make whole Voice logo (icon AND text) a homepage link

Fix search results errors

Describe the bug

The following errors have been discovered:

  • Search for 'MN 1-50' or 'MN 1-10' returns "No suttas found"; and other problems.
  • Search for sutta range such as AN10.1-50 sometimes fails with sutta not found for "bodhi"
  • 🚧 "majjhimanikaya1-50" (with or without capital) brings results, namely 50 times DN 34!
  • The name Sabbamitta only occurs twice in the canon (search returns a few more suttas where it is not found).
  • Search for "ānapānassatisutta" finds nothing.

To Reproduce

Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior

A clear and concise description of what you expected to happen.

Screenshots

If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: [e.g. iOS]
  • Browser [e.g. chrome, safari]
  • Version [e.g. 22]

Smartphone (please complete the following information):

  • Device: [e.g. iPhone6]
  • OS: [e.g. iOS8.1]
  • Browser [e.g. stock browser, safari]
  • Version [e.g. 22]

Additional context

Add any other context about the problem here.

Transition Voice operations to a different AWS account

User story

SC-Voice should become independent of its originator.

Feature description (the list of things that need to be done for the ticket to be considered finished):

  • Planning: draft a brief plan for the transition process (who is responsible for what, when etc)
  • Phase 2: switch voice.suttacentral.net to new Elastic IP.

Pre release planning check:

  • Small enough to completed in a release.
  • Dependencies marked
  • No external dependencies block this from being completed.
  • Details are understood by dev team so they know what needs to be done and can determine if it can be completed.

Increase EC2 disk space

User story

As a Voice Admin, I should not have to worry so much about clearing caches

Feature description (the list of things that need to be done for the ticket to be considered finished):

  • Increase Voice baseline disk storage from 8GB to 16GB
  • Update AWS Installation wiki with instructions
  • Update cache progress to use available disk size
  • Install Voice on production server scv-prod3

Pre release planning check:

  • Small enough to completed in a release.
  • Dependencies marked
  • No external dependencies block this from being completed.
  • Details are understood by dev team so they know what needs to be done and can determine if it can be completed.

Preliminary research for adding segmented human voice recording

Some of the initial questions that need to be addressed to get started with the Epic are:

  • can we split up Bhante’s recordings into segments?
  • how will segments sound when glued back together?
  • what happens when we interleave Bhante Pali with Bhante English segment by segment?
  • what needs to be done to support the desire for Opus/OGG files vs. MP3?

Outcome:

  • findings documented in comments below
  • generation of new issues as appropriate.

Double bell sound bug

Describe the bug

Sometimes when a users plays a sutta two different bell sounds are made in quick succession.

To Reproduce

Steps to reproduce the behaviour:

  • Tricky!

Expected behaviour

A single stroke of the bell sound the user has selected in their settings before the reading of the sutta begins.

Screenshots

Issue demonstrated

Desktop (please complete the following information):

  • OS: [e.g. iOS]
  • Browser [e.g. chrome, safari]
  • Version [e.g. 22]

Smartphone (please complete the following information):

  • Device: [e.g. iPhone6]
  • OS: [e.g. iOS8.1]
  • Browser [e.g. stock browser, safari]
  • Version [e.g. 22]

Additional context

Add any other context about the problem here.

Developers have access to all AWS Console functions for voice.suttacentral.net

User story

SC-Voice should become independent of its originator.

Feature description (the list of things that need to be done for the ticket to be considered finished):

  • Developers other than the originator should be able to work on all functions in the AWS console for voice.suttacentral.net.

Pre milestone planning check:

  • Small enough to completed in a release.
  • Dependencies marked
  • No external dependencies block this from being completed.
  • Details are understood by dev team so they know what needs to be done and can determine if it can be completed.

Pause button doesn't work sometimes

Describe the bug

A clear and concise description of what the bug is.

To Reproduce

Steps to reproduce the behaviour:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behaviour

A clear and concise description of what you expected to happen.

Screenshots

If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: [e.g. iOS]
  • Browser [e.g. chrome, safari]
  • Version [e.g. 22]

Smartphone (please complete the following information):

  • Device: [e.g. iPhone6]
  • OS: [e.g. iOS8.1]
  • Browser [e.g. stock browser, safari]
  • Version [e.g. 22]

Additional context

Add any other context about the problem here.

Moving between segments while playing a sutta

So far the way to move between segments is via the blue dot on the sutta playing progress bar. On mobile phones this is not easy to do.

When I use Voice it would be great if I were able to move between segments more easily, for example via a "forward" / "backward" button because this would be easier applicable especially on phones.

Feature description (the list of things that need to be done for the ticket to be considered finished):

  • Functional side
  • UI side

Pre release planning check:

  • Small enough to completed in a milestone.
  • Dependencies marked
  • No external dependencies block this from being completed.
  • Details are understood by dev team so they know what needs to be done and can determine if it can be completed.

Add a bell sound option at the end of a sutta

User story

When I use Voice I don't always know when a sutta has ended, a bell at the end would help know.

Feature description (the list of things that need to be done for the ticket to be considered finished):

  • option in settings for end bell

Pre release planning check:

  • Small enough to completed in a milestone.
  • Dependencies marked
  • No external dependencies block this from being completed.
  • Details are understood by dev team so they know what needs to be done and can determine if it can be completed.

Enable uppercase usernames

Describe the bug

A clear and concise description of what the bug is.

To Reproduce

Steps to reproduce the behaviour:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behaviour

A clear and concise description of what you expected to happen.

Screenshots

If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: [e.g. iOS]
  • Browser [e.g. chrome, safari]
  • Version [e.g. 22]

Smartphone (please complete the following information):

  • Device: [e.g. iPhone6]
  • OS: [e.g. iOS8.1]
  • Browser [e.g. stock browser, safari]
  • Version [e.g. 22]

Additional context

Add any other context about the problem here.

Accessibility audit

A full review of each of Voice component/page as broken down in the sub-issues needs to be conducted

See Sylvie's user experience.

Outcome

  • Findings documented in each issue
  • The generation of new issues to address any problems highlighted

Adjust UI to make other resources more prominent

Description

Other resources (eg. audio of legacy translations) are currently deeply buried on Voice and many users will likely be unaware that they exist. We need a redesign to improve their visibility and this should be done with reference to:

  • any a11y improvements
  • UI design for adding human voice segmented recordings (#7)

Acceptance criteria

  • a design agreed on by all team members
  • the creation of a ticket with a spec understood & agreed by all team members

Admins can handle funding of SC-Voice

User story

SC-Voice should become independent of its originator.

Feature description (the list of things that need to be done for the ticket to be considered finished):

  • It is possible for admins other than the originator to handle funding for Voice.

Pre release planning check:

  • Small enough to completed in a release.
  • Dependencies marked
  • No external dependencies block this from being completed.
  • Details are understood by dev team so they know what needs to be done and can determine if it can be completed.

Admins can designate the server used as [voice.suttacentral.net](http://voice.suttacentral.net/)

User story

SC-Voice should become independent of its originator.

Feature description (the list of things that need to be done for the ticket to be considered finished):

Pre release planning check:

  • Small enough to completed in a release.
  • Dependencies marked
  • No external dependencies block this from being completed.
  • Details are understood by dev team so they know what needs to be done and can determine if it can be completed.

Communicate releases to the public from v1.4 onwards

User story

After switching our workflow to ZenHub our own release and backlog documentation is no longer automatically accessible to the public.

Feature description (the list of things that need to be done for the ticket to be considered finished):

  • Find a way to communicate new releases to the public without having to manually copy all issues into a list in the Wiki.

Pre release planning check:

  • Small enough to completed in a release.
  • Dependencies marked
  • No external dependencies block this from being completed.
  • Details are understood by dev team so they know what needs to be done and can determine if it can be completed.

Two-factor authentication for all users

User story

As an admin I want to be sure that all user accounts are secure so that it is less easy for naughty types to break in and perform naughtiness within the admin suite.

Feature description (the list of things that need to be done for the ticket to be considered finished):

  • [detail]

Pre milestone planning check:

  • Small enough to completed in a milestone.
  • Dependencies marked
  • No external dependencies block this from being completed.
  • Details are understood by dev team so they know what needs to be done and can determine if it can be completed.

Admins can start/stop AWS SCV servers

User story

SC-Voice should become independent of its originator

Feature description (the list of things that need to be done for the ticket to be considered finished):

  • It should be possible to start / stop AWS Voice servers via Admin login.

Pre release planning check:

  • Small enough to completed in a release.
  • Dependencies marked
  • No external dependencies block this from being completed.
  • Details are understood by dev team so they know what needs to be done and can determine if it can be completed.

Amy mispronounces *Godhika*

Amy mispronounces Godhika (for ex. in SN 4.23), Anopama (Thig 6.5), Gosinga (MN31, MN32), Kosiya (MN 37, 10.6), Moggallāna MN 37, 14.1, Kosambi MN128:1.2, Ghosita MN128:1.2—like Gotama

Integrate Nikaya structure

Nikaya icon

The Nikaya icon (see above) opens the Collections page. Coming up with an effective way to navigate the Nikayas will be challenging for both assisted and sighted users.

  • Define relationship between VSMs and Nikaya structure. E.g., How do we show an uninstalled VSM?

UX design for new and existing resources

Description

Subsequent to research around how segmented human voice recordings will be added to Voice, a new design will need to be drafted to accommodate this addition.

In addition, other resources (eg. audio of legacy translations) are currently deeply buried on Voice and many users will likely be unaware that they exist. We need to improve their visibility.

The redesign should be done with reference to any a11y issues testing has highlighted

Considerations

  • An AI fallback option is needed for texts that aren't covered by human voice recording.
  • The UX should be designed to accommodate multiple human voices.
  • The UX should be accessible (and Vuetify components generally aren’t)
  • Users should be able to set different preferences (AI/human) for readings of root text and translation.

Acceptance criteria

  • a11y tested
  • a design agreed on by team members
  • the creation of a ticket with a spec understood & agreed by team members

Amy MN 10 misprounciation

MN 10 section 4 segments 7 ff (similarly certainly in other suttas on breath meditation), English (Amy): "they practice breathing in/out experiencing the whole body": Amy slightly lowers pitch on the second syllable of breathing, then speaks in experiencing as belonging closely together, which gives the sentence quite a different meaning. Maybe add a short pause after "in" and "out"?

Developers can effectively edit all sc-voice repositories

User story

SC-Voice should become independent of its originator.

Feature description (the list of things that need to be done for the ticket to be considered finished):

  • Developers other than the originator can effectively edit all sc-voice repositories.

Pre release planning check:

  • Small enough to completed in a release.
  • Dependencies marked
  • No external dependencies block this from being completed.
  • Details are understood by dev team so they know what needs to be done and can determine if it can be completed.

Amy MN 17 (& other) misprounciation

MN 17 section 2 segment 49: "And the necessities of life that a renunciate requires—robes, alms-food, lodgings, and medicines and supplies for the sick—are hard to come by. ..." Amy pronounces "dot—dot—dot" at the end of the segment.

  • The same in DN 34 section 10 segment 53 and other places in that sutta.
  • MN 17 #SC 23.3
  • MN 23 section 2 segments 65, 67, 69: "dot" is pronounced in the Pali.
  • MN 76 #SC 8.16

Translators and Editors have content privileges: edit language dictionaries, voice definitions and examples.

User story

SC-Voice should become independent of its originator.

Feature description (the list of things that need to be done for the ticket to be considered finished):

  • Add login for translators and editors to access and edit language dictionaries, voice definitions and examples.

Pre release planning check:

  • Small enough to completed in a release.
  • Dependencies marked
  • No external dependencies block this from being completed.
  • Details are understood by dev team so they know what needs to be done and can determine if it can be completed.

Isolate translatable user interface text into language modules.

User story

When Voice will have languages other than English user interface text will have to be translated.

Feature description (the list of things that need to be done for the ticket to be considered finished):

  • A file is created that translators can use.

Pre release planning check:

  • Small enough to completed in a release.
  • Dependencies marked
  • No external dependencies block this from being completed.
  • Details are understood by dev team so they know what needs to be done and can determine if it can be completed.

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.