Skip to content

Commit

Permalink
Merge pull request #12 from tsubakimoto/issue11
Browse files Browse the repository at this point in the history
Add bicep files
  • Loading branch information
tsubakimoto authored Jan 21, 2024
2 parents e6709c7 + 5aa4500 commit 587cf75
Show file tree
Hide file tree
Showing 4 changed files with 47 additions and 2 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
# Speech Translator
This app is speech translator and recoder using [Azure AI Speech](https://azure.microsoft.com/en-us/products/ai-services/ai-speech).
This app is speech translator and recorder using [Azure AI Speech](https://azure.microsoft.com/en-us/products/ai-services/ai-speech).

## Prerequisites

- [.NET 8.0 SDK](https://dot.net/download)

## How to use

1. Create Azure AI Speech resource.
1. Create Azure AI Speech resource. ([Bicep](./infra/main.bicep))
2. Copy `Subscription Key` and `Region` from Azure Portal.
3. Clone this repository.
4. Create `src/SpeechTranslatorConsole/appsettings.Development.json`.
Expand Down
24 changes: 24 additions & 0 deletions infra/main.bicep
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
@description('That name is the name of our application. It has to be unique.Type a name followed by your resource group name. (<name>-<resourceGroupName>)')
param cognitiveServiceName string = 'cog-${uniqueString(resourceGroup().id)}'

@description('Location for all resources.')
param location string = resourceGroup().location

@allowed([
'S0'
])
param sku string = 'S0'

resource cognitiveService 'Microsoft.CognitiveServices/accounts@2021-10-01' = {
name: cognitiveServiceName
location: location
sku: {
name: sku
}
kind: 'CognitiveServices'
properties: {
apiProperties: {
statisticsEnabled: false
}
}
}
15 changes: 15 additions & 0 deletions infra/main.parameters.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentParameters.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"location": {
"value": "${AZURE_LOCATION}"
},
"cognitiveServicesName": {
"value": "${AZURE_COGNITIVE_SERVICE_NAME}"
},
"cognitiveServicesSkuName": {
"value": "S0"
}
}
}
6 changes: 6 additions & 0 deletions speech-translator.sln
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,12 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{00192D0A
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SpeechTranslatorShared.Tests", "tests\Shared.Tests\SpeechTranslatorShared.Tests.csproj", "{EA08923B-519F-40CB-B219-4826FE0954F2}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "infra", "infra", "{29895FE7-AC12-4776-8802-1143D61EE2D8}"
ProjectSection(SolutionItems) = preProject
infra\main.bicep = infra\main.bicep
infra\main.parameters.json = infra\main.parameters.json
EndProjectSection
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand Down

0 comments on commit 587cf75

Please sign in to comment.