microsoft / microsoft/SynapseML
How to add Phrase List to SpeechToTextSDK to improve transcription?
- Dominant language
- Scala
- Stars
- 5.2k
- Forks
- 868
- Avg merge
- 22h 9m
- Merged PRs (30d)
- 45
Description
### SynapseML version
synapseml_2.12:0.10.0
### System information
- **Language version** : Python 3.8.10
- **Spark Version** (e.g. 3.2.2): 10.4 LTS (includes Apache Spark 3.2.1, Scala 2.12)
- **Spark Platform** : Databricks
### Describe the problem
Hello all,
I'm using SpeechToTextSDK of SynapseML Cognitives in Databricks to transcribe audio files into texts with below following code that works successfully but only without Phrase List :
I found a reference to create regular phrase list here :
https://docs.microsoft.com/en-us/azure/cognitive-services/speech-service/improve-accuracy-phrase-list?tabs=terminal&pivots=programming-language-python#implement-phrase-list
But how can I add a Phrase List to the SpeechToTextSDK in SynapseML please?
Thankyou,
### Code to reproduce issue
import [synapse.ml](http://synapse.ml/)
from synapse.ml.cognitive import *
stt = (SpeechToTextSDK()
.setSubscriptionKey(YOUR_API_KEY)
.setLocation(REGION)
.setOutputCol("text")
.setAudioDataCol("content")
.setFormat("detailed")
.setFileTypeCol("format")
.setLanguageCol("lang")
.setStreamIntermediateResults(False)
)
results = stt.transform(audio_w_lang_format)
display(results)
### Other info / logs
_No response_
### What component(s) does this bug affect?
- [X] `area/cognitive`: Cognitive project
- [ ] `area/core`: Core project
- [ ] `area/deep-learning`: DeepLearning project
- [ ] `area/lightgbm`: Lightgbm project
- [ ] `area/opencv`: Opencv project
- [ ] `area/vw`: VW project
- [ ] `area/website`: Website
- [ ] `area/build`: Project build system
- [ ] `area/notebooks`: Samples under notebooks folder
- [ ] `area/docker`: Docker usage
- [ ] `area/models`: models related issue
### What language(s) does this bug affect?
- [ ] `language/scala`: Scala source code
- [X] `language/python`: Pyspark APIs
- [ ] `language/r`: R APIs
- [ ] `language/csharp`: .NET APIs
- [ ] `language/new`: Proposals for new client languages
### What integration(s) does this bug affect?
- [ ] `integrations/synapse`: Azure Synapse integrations
- [ ] `integrations/azureml`: Azure ML integrations
- [X] `integrations/databricks`: Databricks integrations
AB#1956013
Contributor guide
Assessment
This issue has not been assessed yet.