-
-
Notifications
You must be signed in to change notification settings - Fork 604
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add Microsoft Azure Speech to Text API
- Loading branch information
dessant
committed
Dec 8, 2018
1 parent
0c9a824
commit f8c1dde
Showing
12 changed files
with
250 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
import browser from 'webextension-polyfill'; | ||
|
||
const message = 'Add Microsoft Azure Speech to Text API'; | ||
|
||
const revision = 'UidMDYaYA'; | ||
const downRevision = 'ONiJBs00o'; | ||
|
||
const storage = browser.storage.local; | ||
|
||
async function upgrade() { | ||
const changes = { | ||
microsoftSpeechApiLoc: 'eastUs', // 'eastUs', 'eastUs2', 'westUs', 'westUs2', 'eastAsia', 'southeastAsia', 'westEu', 'northEu' | ||
microsoftSpeechApiKey: '' | ||
}; | ||
|
||
changes.storageVersion = revision; | ||
return storage.set(changes); | ||
} | ||
|
||
async function downgrade() { | ||
const changes = {}; | ||
await storage.remove(['microsoftSpeechApiLoc', 'microsoftSpeechApiKey']); | ||
|
||
changes.storageVersion = downRevision; | ||
return storage.set(changes); | ||
} | ||
|
||
export {message, revision, upgrade, downgrade}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
{"versions": ["UoT3kGyBH", "ONiJBs00o"]} | ||
{"versions": ["UoT3kGyBH", "ONiJBs00o", "UidMDYaYA"]} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
import browser from 'webextension-polyfill'; | ||
|
||
const message = 'Add Microsoft Azure Speech to Text API'; | ||
|
||
const revision = 'UidMDYaYA'; | ||
const downRevision = 'ONiJBs00o'; | ||
|
||
const storage = browser.storage.sync; | ||
|
||
async function upgrade() { | ||
const changes = { | ||
microsoftSpeechApiLoc: 'eastUs', // 'eastUs', 'eastUs2', 'westUs', 'westUs2', 'eastAsia', 'southeastAsia', 'westEu', 'northEu' | ||
microsoftSpeechApiKey: '' | ||
}; | ||
|
||
changes.storageVersion = revision; | ||
return storage.set(changes); | ||
} | ||
|
||
async function downgrade() { | ||
const changes = {}; | ||
await storage.remove(['microsoftSpeechApiLoc', 'microsoftSpeechApiKey']); | ||
|
||
changes.storageVersion = downRevision; | ||
return storage.set(changes); | ||
} | ||
|
||
export {message, revision, upgrade, downgrade}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
{"versions": ["UoT3kGyBH", "ONiJBs00o"]} | ||
{"versions": ["UoT3kGyBH", "ONiJBs00o", "UidMDYaYA"]} |
Oops, something went wrong.