Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multithread #5

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 38 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: bug
assignees:

---

**Describe the bug**
<!-- A clear and concise description of what the bug is. -->

**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. -->
20 changes: 20 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
name: Feature request
about: Suggest an idea for this project
title: ''
labels: Enhancement
assignees:

---

**Is your feature request related to a problem? Please describe.**
<!-- A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] -->

**Describe the solution you'd like**
<!-- A clear and concise description of what you want to happen. -->

**Describe alternatives you've considered**
<!-- A clear and concise description of any alternative solutions or features you've considered. -->

**Additional context**
<!-- Add any other context or screenshots about the feature request here. -->
10 changes: 10 additions & 0 deletions .github/ISSUE_TEMPLATE/question.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
name: Question
about: Ask a question about this project
title: ''
labels: bug
assignees:

---

<!-- _where applicable, please provide context and use case around your question._ -->
12 changes: 12 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
**Is your Pull Request request related to another issue in this repository ?**
<!-- _If so please link to other issues and PRs as appropriate_ -->

**Describe what the PR does**
<!-- _A clear and concise description of what the PR does. Feel free to use bulletpoints and checkboxes if needed [...]_ -->


**State whether the PR is ready for review or whether it needs extra work**
<!-- _If you are still working on it and just setting it up for later review, or if it's ready to be reviewed for merging_ -->

**Additional context**
<!-- Add any other context or screenshots about the PR. -->
20 changes: 18 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,27 @@ node_modules
.node_repl_history


# Video audio files

#ignore all video files
*.wmv
*.mpg
*.mpeg
*.mp4
*.mov
*.flv
*.avi
*.ogv
*.ogg
*.webm

#ignore audio file
*.wav
*.mp3

#ingore subtitles files
*.srt
*.mp4.json
*.sbv


lib/
dist/
9 changes: 4 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,12 @@ npm install pocketsphinx-stt
There are two options, one expect the file to be already an audio file that can work with pocketsphixn

```js
const transcribe = require('pocketsphinx-stt').transcribe;
const transcribe = require('pocketsphinx-stt');
const videoFilePath = // some video file

transcribe(videoFilePath)
.then((res) => {
console.log('transcribe', res);
})
transcribe(videoFilePath).then((transcript)=>{
// Do something with the transcript
})
```


Expand Down
Empty file added docs/.keep
Empty file.
72 changes: 72 additions & 0 deletions docs/ADR/ADR-Template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
# [short title of solved problem and solution]

* Status: [accepted | superseded by [ADR-0005](0005-example.md) | deprecated | …] <!-- optional -->
* Deciders: [list everyone involved in the decision] <!-- optional -->
* Date: [YYYY-MM-DD when the decision was last updated] <!-- optional -->

Technical Story: [description | ticket/issue URL] <!-- optional -->

## Context and Problem Statement

[Describe the context and problem statement, e.g., in free form using two to three sentences. You may want to articulate the problem in form of a question.]

## Decision Drivers <!-- optional -->

* [driver 1, e.g., a force, facing concern, …]
* [driver 2, e.g., a force, facing concern, …]
* … <!-- numbers of drivers can vary -->

## Considered Options

* [option 1]
* [option 2]
* [option 3]
* … <!-- numbers of options can vary -->

## Decision Outcome

Chosen option: "[option 1]", because [justification. e.g., only option, which meets k.o. criterion decision driver | which resolves force force | … | comes out best (see below)].

### Positive Consequences <!-- optional -->

* [e.g., improvement of quality attribute satisfaction, follow-up decisions required, …]
* …

### Negative consequences <!-- optional -->

* [e.g., compromising quality attribute, follow-up decisions required, …]
* …

## Pros and Cons of the Options <!-- optional -->

### [option 1]

[example | description | pointer to more information | …] <!-- optional -->

* Good, because [argument a]
* Good, because [argument b]
* Bad, because [argument c]
* … <!-- numbers of pros and cons can vary -->

### [option 2]

[example | description | pointer to more information | …] <!-- optional -->

* Good, because [argument a]
* Good, because [argument b]
* Bad, because [argument c]
* … <!-- numbers of pros and cons can vary -->

### [option 3]

[example | description | pointer to more information | …] <!-- optional -->

* Good, because [argument a]
* Good, because [argument b]
* Bad, because [argument c]
* … <!-- numbers of pros and cons can vary -->

## Links <!-- optional -->

* [Link type] [Link to ADR] <!-- example: Refined by [ADR-0005](0005-example.md) -->
* … <!-- numbers of links can vary -->
Empty file added docs/guides/.keep
Empty file.
Empty file added docs/notes/.keep
Empty file.
7 changes: 6 additions & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

104 changes: 52 additions & 52 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,54 +1,54 @@
{
"name": "pocketsphinx-stt",
"version": "2.0.2",
"description": "pocketsphinx speech to text - offline",
"main": "index.js",
"babel": {
"presets": [
[
"@babel/env",
{
"targets": {
"node": "10.16.3"
}
}
]
],
"plugins": [
[
"@babel/plugin-proposal-object-rest-spread",
{
"useBuiltIns": true
}
]
]
},
"scripts": {
"test": "echo \"Error: no test specified\"",
"start": "node src/index.js",
"build": "babel src -d dist",
"package:pocketsphinx":"rm -f ./dist/pocketsphinx-stt/sphinxbase/ || true && cp -r ./src/pocketsphinx-stt/sphinxbase ./dist/pocketsphinx-stt/sphinxbase && rm -rf ./dist/pocketsphinx-stt/pocketsphinx || true && cp -r ./src/pocketsphinx-stt/pocketsphinx ./dist/pocketsphinx-stt/pocketsphinx",
"package:js":"npm run build && rm ./dist/package.json || true && cp package.json ./dist/package.json && rm ./dist/README.md || true && cp README.md ./dist/README.md || true",
"publish:public": "npm run package:js && npm run package:pocketsphinx && npm publish dist --access public",
"publish:dry:run": "npm publish --dry-run",
"lint:fix": "eslint ./packages/* --fix"

},
"author": "Pietro Passarelli <[email protected]> (http://pietropassarelli.com)",
"license": "MIT",
"homepage": "https://github.com/OpenNewsLabs/pocketsphinx-stt",
"repository": {
"type": "git",
"url": "git+https://github.com/OpenNewsLabs/pocketsphinx-stt.git"
},
"dependencies": {
"ffmpeg-static-electron": "^2.0.1",
"fluent-ffmpeg": "^2.1.2"
},
"devDependencies": {
"@babel/cli": "^7.6.0",
"@babel/core": "^7.6.0",
"@babel/plugin-proposal-object-rest-spread": "^7.5.5",
"@babel/preset-env": "^7.6.0"
}
"name": "pocketsphinx-stt",
"version": "3.0.0-alpha.1",
"description": "pocketsphinx speech to text - offline",
"main": "index.js",
"babel": {
"presets": [
[
"@babel/env",
{
"targets": {
"node": "10.16.3"
}
}
]
],
"plugins": [
[
"@babel/plugin-proposal-object-rest-spread",
{
"useBuiltIns": true
}
]
]
},
"scripts": {
"test": "echo \"Error: no test specified\"",
"start": "node --experimental-worker ./src/example-usage.js",
"build": "babel src -d dist",
"package:pocketsphinx": "rm -f ./dist/pocketsphinx-stt/sphinxbase/ || true && cp -r ./src/pocketsphinx-stt/sphinxbase ./dist/pocketsphinx-stt/sphinxbase && rm -rf ./dist/pocketsphinx-stt/pocketsphinx || true && cp -r ./src/pocketsphinx-stt/pocketsphinx ./dist/pocketsphinx-stt/pocketsphinx",
"package:js": "npm run build && rm ./dist/package.json || true && cp package.json ./dist/package.json && rm ./dist/README.md || true && cp README.md ./dist/README.md || true",
"publish:public": "npm run package:js && npm run package:pocketsphinx && npm publish dist --access public",
"publish:dry:run": "npm publish --dry-run",
"lint:fix": "eslint ./packages/* --fix"
},
"author": "Pietro Passarelli <[email protected]> (http://pietropassarelli.com)",
"license": "MIT",
"homepage": "https://github.com/OpenNewsLabs/pocketsphinx-stt",
"repository": {
"type": "git",
"url": "git+https://github.com/OpenNewsLabs/pocketsphinx-stt.git"
},
"dependencies": {
"ffmpeg-static-electron": "^2.0.1",
"ffprobe-static-electron": "^2.0.0",
"fluent-ffmpeg": "^2.1.2"
},
"devDependencies": {
"@babel/cli": "^7.6.0",
"@babel/core": "^7.6.0",
"@babel/plugin-proposal-object-rest-spread": "^7.5.5",
"@babel/preset-env": "^7.6.0"
}
}
Loading