-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make it easy to run StartTranscription function locally for developme…
…nt. (#2412) * Make it easy to run StartTranscription function locally for development. * use spaces instead of tabs in text file --------- Co-authored-by: Henry van der Vegte <[email protected]>
- Loading branch information
1 parent
a1ceb33
commit 9604d61
Showing
5 changed files
with
53 additions
and
0 deletions.
There are no files selected for viewing
9 changes: 9 additions & 0 deletions
9
samples/ingestion/ingestion-client/.devcontainer/devcontainer.json
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,9 @@ | ||
{ | ||
"name": "C# (.NET)", | ||
"image": "mcr.microsoft.com/devcontainers/dotnet:1-8.0-bookworm", | ||
"features": { | ||
"ghcr.io/devcontainers/features/azure-cli:1": {}, | ||
"ghcr.io/devcontainers/features/node:1": {}, | ||
"ghcr.io/jlaundry/devcontainer-features/azure-functions-core-tools:1": {} | ||
} | ||
} |
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,12 @@ | ||
# To get started with Dependabot version updates, you'll need to specify which | ||
# package ecosystems to update and where the package manifests are located. | ||
# Please see the documentation for more information: | ||
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates | ||
# https://containers.dev/guide/dependabot | ||
|
||
version: 2 | ||
updates: | ||
- package-ecosystem: "devcontainers" | ||
directory: "/" | ||
schedule: | ||
interval: weekly |
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,2 @@ | ||
.vscode | ||
local.settings.json |
25 changes: 25 additions & 0 deletions
25
samples/ingestion/ingestion-client/StartTranscriptionByTimer/README.md
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,25 @@ | ||
# Local development instructions | ||
|
||
Pre-requisites: | ||
1. Please follow the instructions on [the main guide](./../Setup/guide.md#ingestion-client-setup-instructions) to deploy the Ingestion Client and associated ecosystem to Azure. | ||
2. Reopen the project within a [devcontainer](https://containers.dev/overview). (The devcontainer settings at the root of the project have the tools needed to develop and run this function locally) | ||
|
||
To run the StartTranscriptionByTimer function locally, do the following: | ||
|
||
1. Run the following command to fetch your Azure Function app settings and save them to local.settings.json: | ||
|
||
``` | ||
func azure functionapp fetch-app-settings <function app name> | ||
``` | ||
|
||
Note: Replace `<function app name>` with the actual name of your function app that you can get from the Azure Portal. It will look like `StartTranscriptionFunction-20240531T092901Z`. | ||
|
||
2. In the local.settings.json file, replace the value of the `AzureSpeechServicesKey` with the actual key for your Azure Speech Service instance. You can get this from the Azure portal. | ||
|
||
3. Navigate to the StartTranscription function running on your Azure via the portal, and click on Stop. You need to do this so that you don't have two instances of the StartTranscription function running and listening to the same events when you start the function from your local machine in the next step. | ||
|
||
4. Run the following command to start the local function (this will apply your local code changes): | ||
|
||
``` | ||
func start | ||
``` |
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