Skip to content

Commit

Permalink
feat(accessibility): adds accessibility features
Browse files Browse the repository at this point in the history
This commit adds the main initial library features:

Audio/Video transcriotion powered by aws serverless
Voice Command module
Voice Synthesis
Voice Transcription in real time
  • Loading branch information
danilolmc committed Oct 27, 2023
2 parents 83fa649 + c4fa8ae commit 16e2d3b
Show file tree
Hide file tree
Showing 35 changed files with 15,751 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"presets": ["@babel/preset-env"]
}
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
/node_modules
/dist
/index.mjs
/index.html
4 changes: 4 additions & 0 deletions .husky/commit-msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

npx --no -- commitlint --edit $1
18 changes: 18 additions & 0 deletions bin/cli.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#!/usr/bin/env node

import chalk from 'chalk';
import figlet from 'figlet';
import getUserInput from './getUserInput';

function start() {
try {
const aschiiZaity = figlet.textSync('Zaity', { width: 150 });
console.log(chalk.cyan(aschiiZaity));
console.log(chalk.cyan('\n Your transcription library for accessibility!'));
getUserInput()
} catch (error) {
console.log(error)
}
}

start()
17 changes: 17 additions & 0 deletions bin/getCloudProvider.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import inquirer from "inquirer"

export default async function getCloudProvider() {
const answers = await inquirer.prompt([
{
type: 'list',
name: 'cloudProvider',
message: 'Select your cloud provider:',
choices: ['AWS', 'Azure', 'Google Cloud'],
default: 'AWS',
single: true,
}
]);
const { cloudProvider } = answers;
return String(cloudProvider);

}
39 changes: 39 additions & 0 deletions bin/getUserInput.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
import inquirer from "inquirer";
import installDependencies from "./installDependencies";

function defineDependencies(key: string) {
const dependenciesCloudMap = new Map<string, string[]>([
['AWS', ['@aws-sdk/client-transcribe']],
]);

return dependenciesCloudMap.get(key) as string[];
}

export default function getUserInput() {

inquirer.prompt([
{
type: 'list',
name: 'environment',
message: 'Select your runtime environment:',
choices: ['NodeJS', 'Browser'],
default: 'NodeJS',
single: true,
},
]).then(async (answers: any) => {
const env: string = answers.environment;

if(env == 'NodeJS') {
installDependencies(defineDependencies('AWS'))
return;
}

if(env == 'Browser') {
installDependencies(defineDependencies('AWS'))
return;
}

}).catch((err: any) => {
console.log(err);
})
}
25 changes: 25 additions & 0 deletions bin/installDependencies.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
import { execa } from "execa";

export default async function installDependencies(dependencies: string[]) {

try {

console.log('\n Installing dependencies...');

for (const dependencie of dependencies) {
process.stdout.write(`\n Installing ${dependencie} - Loading... ⌛`);
try {
await execa('npm', ['install', dependencie]);
process.stdout.write('\r');
process.stdout.write('\x1b[K');
process.stdout.write(`\r Installing ${dependencie} - Done! ✅`);
} catch (error) {
console.log('\x1b[31m%s\x1b[0m', `\nError on installing ${dependencie}, try it yourself by running npm install ${dependencie}!`);
}
}
console.log('\x1b[32m%s\x1b[0m',"\n\nSuccess on setup, let's code! ✅");

}catch(error) {
console.log(error)
}
}
1 change: 1 addition & 0 deletions commitlint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
module.exports = {extends: ['@commitlint/config-conventional']}
15 changes: 15 additions & 0 deletions jsdoc.config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"source": {
"include": ["src"],
"includePattern": ".+\\.js$"
},
"plugins": [],
"templates": {
"cleverLinks": false,
"monospaceLinks": false
},
"opts": {
"destination": "docs",
"recurse": true
}
}
Loading

0 comments on commit 16e2d3b

Please sign in to comment.