Skip to content

Commit

Permalink
Add instructions to run StartTranscriptionByServiceBus and FetchTrans…
Browse files Browse the repository at this point in the history
…cription functions locally (#2415)
  • Loading branch information
superhindupur authored Jun 12, 2024
1 parent 9604d61 commit b5960e7
Show file tree
Hide file tree
Showing 5 changed files with 61 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,9 @@
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
</ItemGroup>
<ItemGroup>
<None Update="local.settings.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
</ItemGroup>
</Project>
25 changes: 25 additions & 0 deletions samples/ingestion/ingestion-client/FetchTranscription/README.md
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 FetchTranscription 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 `FetchTranscriptionFunction-20240531T092901Z`.

2. In the local.settings.json file generated by the previous step, replace the value of the `AzureSpeechServicesKey` with the actual key for your Azure Speech Service instance. You can get this from the Azure portal. (If you're using the SQL database or the Text Analytics, do the same for these keys as well)

3. Navigate to the FetchTranscription 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 FetchTranscription 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
```
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 StartTranscriptionByServiceBus 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 generated by the previous step, 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
```
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,11 @@
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
</ItemGroup>
<ItemGroup>
<None Update="local.settings.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Connector\Connector.csproj"/>
<ProjectReference Include="..\StartTranscriptionByTimer\StartTranscriptionByTimer.csproj"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ 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.
2. In the local.settings.json file generated by the previous step, 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.

Expand Down

0 comments on commit b5960e7

Please sign in to comment.