Manage assets and models built from assets for Cognitive Services
This project has been separated out into a streaming upload server and triggered Azure functions. The streaming server has been moved to a separate repo.
-
Fork and clone project
-
Copy
env.sample
and rename to.env
. -
Create Azure resources
- Speech
- Translator
- Storage
-
Fill in values in
.env
:Variable Purpose SPEECHRESOURCETOKENHOST westus.api.cognitive.microsoft.com
- Token server. TBD - fix when fixing custom endpoints across Cognitive Services.SPEECHRESOURCETTSHOST westus.tts.speech.microsoft.com
- TBD - fix when fixing custom endpoints across Cognitive Services.SPEECHKEY Cognitive Services Speech key DFBAPISERVERVER 0.1
- versioning of node.js server appDFBAPISERVERPORT 3005
- Local node.js server port.DFBAPIUPLOADSERVERDIR upload
- Local directory where files are uploaded to.DFBAPIDOWNLOADSERVERDIR out
- Local directory to store downloadable files. TBD - Move to Azure files.DFBAPIDOWNLOADSERVERURI localhost
- Host used for download URIs.DFBAPIDOWNLOADSERVERPORT 3010
- Port used for download URIs. Create MP3 from text then return download URI.TRANSLATORKEY Cognitive Services Translator key, currently hardcoded to westus region. AZSTORAGECONNECTIONSTRING Azure storage connection string AZSTORAGECONTAINER containercogservblob
Your custom name for container in Azure StorageSECRET String used to create user authentication token -
npm start
to run server ornpm test
to run Jest tests. -
Deploy to Azure web app from local Git. Instructions to redeploy from CLI.
Following instructions.
Do this once, at the beginning, for each local computer you develop with.
-
Create user for local git:
az webapp deployment source config-local-git --name <app-name> --resource-group <group-name>
-
Get credentials
az webapp deployment list-publishing-credentials --name <app-name> --resource-group <group-name> --query scmUri --output tsv
-
Use URL from response, create remote link for git
git remote add azure <url>
-
Deploy to azure.
git push azure master