mirror of
https://github.com/leon-ai/leon.git
synced 2024-12-25 09:44:22 +03:00
Merge branch 'develop' into develop
This commit is contained in:
commit
4f61965441
11
README.md
11
README.md
@ -17,7 +17,8 @@
|
||||
<a href="https://getleon.ai">Website</a> ::
|
||||
<a href="https://docs.getleon.ai">Documentation</a> ::
|
||||
<a href="https://roadmap.getleon.ai">Roadmap</a> ::
|
||||
<a href="https://github.com/leon-ai/leon/blob/develop/.github/CONTRIBUTING.md">Contributing</a>
|
||||
<a href="https://github.com/leon-ai/leon/blob/develop/.github/CONTRIBUTING.md">Contributing</a> ::
|
||||
<a href="https://blog.getleon.ai/the-story-behind-leon/">Story</a>
|
||||
</p>
|
||||
|
||||
---
|
||||
@ -36,8 +37,8 @@ If you want to, Leon can communicate with you by being **offline to protect your
|
||||
> 1. If you are a developer (or not), you may want to build many things that could help in your daily life.
|
||||
> Instead of building a dedicated project for each of those ideas, Leon can help you with his
|
||||
> packages/modules (skills) structure.
|
||||
> 2. With this generic structure, everyone can create his own modules and share them with others.
|
||||
> Therefore there is only one core (to govern all of them).
|
||||
> 2. With this generic structure, everyone can create their own modules and share them with others.
|
||||
> Therefore there is only one core (to rule them all).
|
||||
> 3. Leon uses AI concepts, which is cool.
|
||||
> 4. Privacy matters, you can configure Leon to talk with him offline. You can already text with him without any third party services.
|
||||
> 5. Open-source is great.
|
||||
@ -118,6 +119,10 @@ If you have an idea about improving Leon, do not hesitate.
|
||||
|
||||
**Leon needs open-source to live**, the more modules he has, the more skillful he becomes.
|
||||
|
||||
## The Story Behind Leon
|
||||
|
||||
You'll find a write-up on this [blog post](https://blog.getleon.ai/the-story-behind-leon/).
|
||||
|
||||
## Stay Tuned
|
||||
- [Newsletter](https://getleon.ai)
|
||||
- [Blog](https://blog.getleon.ai)
|
||||
|
Binary file not shown.
Before Width: | Height: | Size: 17 KiB After Width: | Height: | Size: 11 KiB |
@ -66,7 +66,7 @@ def output(type, code, speech = ''):
|
||||
def finddomains(string):
|
||||
"""Find a domain name substring from a string"""
|
||||
|
||||
return findall('[a-z0-9\-]{,63}\.[a-z0-9\-\.]{2,191}', string)
|
||||
return findall('[a-z0-9\-]{,63}\.[a-z0-9\-\.]{2,191}', string.lower())
|
||||
|
||||
def http(method, url):
|
||||
"""Send HTTP request with the Leon user agent"""
|
||||
|
12
package-lock.json
generated
12
package-lock.json
generated
@ -10183,14 +10183,14 @@
|
||||
}
|
||||
},
|
||||
"npm-bundled": {
|
||||
"version": "1.0.5",
|
||||
"resolved": "https://registry.npmjs.org/npm-bundled/-/npm-bundled-1.0.5.tgz",
|
||||
"integrity": "sha512-m/e6jgWu8/v5niCUKQi9qQl8QdeEduFA96xHDDzFGqly0OOjI7c+60KM/2sppfnUU9JJagf+zs+yGhqSOFj71g=="
|
||||
"version": "1.0.6",
|
||||
"resolved": "https://registry.npmjs.org/npm-bundled/-/npm-bundled-1.0.6.tgz",
|
||||
"integrity": "sha512-8/JCaftHwbd//k6y2rEWp6k1wxVfpFzB6t1p825+cUb7Ym2XQfhwIC5KwhrvzZRJu+LtDE585zVaS32+CGtf0g=="
|
||||
},
|
||||
"npm-packlist": {
|
||||
"version": "1.2.0",
|
||||
"resolved": "https://registry.npmjs.org/npm-packlist/-/npm-packlist-1.2.0.tgz",
|
||||
"integrity": "sha512-7Mni4Z8Xkx0/oegoqlcao/JpPCPEMtUvsmB0q7mgvlMinykJLSRTYuFqoQLYgGY8biuxIeiHO+QNJKbCfljewQ==",
|
||||
"version": "1.4.0",
|
||||
"resolved": "https://registry.npmjs.org/npm-packlist/-/npm-packlist-1.4.0.tgz",
|
||||
"integrity": "sha512-zCAmKshsFx2MhOsXdYmZd1DO2d8ts80kVASSWX6lv8654i0edCnNCoEqwVsMygl1BSroCPW6Zh5Dcw+ann775g==",
|
||||
"requires": {
|
||||
"ignore-walk": "^3.0.1",
|
||||
"npm-bundled": "^1.0.1"
|
||||
|
@ -56,7 +56,7 @@
|
||||
"aws-sdk": "^2.382.0",
|
||||
"body-parser": "^1.17.2",
|
||||
"cross-env": "^5.2.0",
|
||||
"deepspeech": "^0.4.0",
|
||||
"deepspeech": "^0.4.1",
|
||||
"dotenv": "^4.0.0",
|
||||
"execa": "^0.10.0",
|
||||
"express": "^4.15.3",
|
||||
|
@ -12,7 +12,7 @@ export default () => new Promise(async (resolve, reject) => {
|
||||
|
||||
const destDeepSpeechFolder = 'bin/deepspeech'
|
||||
const tmpDir = 'scripts/tmp'
|
||||
const archiveName = 'deepspeech-0.4.0-models.tar.gz'
|
||||
const archiveName = 'deepspeech-0.4.1-models.tar.gz'
|
||||
let downloader = 'wget'
|
||||
if (os.get().type === 'macos') {
|
||||
downloader = 'curl -L -O'
|
||||
@ -21,7 +21,7 @@ export default () => new Promise(async (resolve, reject) => {
|
||||
if (!fs.existsSync(`${destDeepSpeechFolder}/lm.binary`)) {
|
||||
try {
|
||||
log.info('Downloading pre-trained model...')
|
||||
await shell(`cd ${tmpDir} && ${downloader} https://github.com/mozilla/DeepSpeech/releases/download/v0.4.0/${archiveName}`)
|
||||
await shell(`cd ${tmpDir} && ${downloader} https://github.com/mozilla/DeepSpeech/releases/download/v0.4.1/${archiveName}`)
|
||||
log.success('Pre-trained model download done')
|
||||
log.info('Unpacking...')
|
||||
await shell(`cd ${tmpDir} && tar xvfz ${archiveName}`)
|
||||
|
@ -34,7 +34,7 @@ try {
|
||||
// Beam width used in the CTC decoder when building candidate transcriptions
|
||||
const BEAM_WIDTH = 500
|
||||
// The alpha hyperparameter of the CTC decoder. Language Model weight
|
||||
const LM_WEIGHT = 1.50
|
||||
const LM_ALPHA = 0.75
|
||||
// The beta hyperparameter of the CTC decoder. Word insertion weight (penalty)
|
||||
// const WORD_COUNT_WEIGHT = 1.00;
|
||||
/**
|
||||
@ -42,7 +42,7 @@ const LM_WEIGHT = 1.50
|
||||
* This is used to lessen the word insertion penalty
|
||||
* When the inserted word is part of the vocabulary
|
||||
*/
|
||||
const VALID_WORD_COUNT_WEIGHT = 2.10
|
||||
const LM_BETA = 1.85
|
||||
|
||||
/**
|
||||
* These constants are tied to the shape of the graph used (changing them changes
|
||||
@ -115,7 +115,7 @@ parser.init = (args) => {
|
||||
/* istanbul ignore if */
|
||||
if (process.env.LEON_NODE_ENV !== 'testing') {
|
||||
model.enableDecoderWithLM(args.alphabet, args.lm, args.trie,
|
||||
LM_WEIGHT, VALID_WORD_COUNT_WEIGHT)
|
||||
LM_ALPHA, LM_BETA)
|
||||
}
|
||||
|
||||
log.success('Language model loaded')
|
||||
|
Loading…
Reference in New Issue
Block a user