Spaces:
Running
Running
Salman11223
commited on
Update translator.py
Browse files- translator.py +2 -2
translator.py
CHANGED
@@ -42,7 +42,7 @@ class translation:
|
|
42 |
return audio_path
|
43 |
|
44 |
def transcribe_audio(self, audio_path):
|
45 |
-
aai.settings.api_key = "
|
46 |
config = aai.TranscriptionConfig(language_code=self.lan_code)
|
47 |
transcriber = aai.Transcriber(config=config)
|
48 |
transcript = transcriber.transcribe(audio_path)
|
@@ -52,7 +52,7 @@ class translation:
|
|
52 |
base_url = "https://api.cognitive.microsofttranslator.com"
|
53 |
endpoint = "/translate"
|
54 |
headers = {
|
55 |
-
"Ocp-Apim-Subscription-Key": "
|
56 |
"Content-Type": "application/json",
|
57 |
"Ocp-Apim-Subscription-Region": "southeastasia"
|
58 |
}
|
|
|
42 |
return audio_path
|
43 |
|
44 |
def transcribe_audio(self, audio_path):
|
45 |
+
aai.settings.api_key = "c29eb650444a4ae4be6a787ebb15d5e2"
|
46 |
config = aai.TranscriptionConfig(language_code=self.lan_code)
|
47 |
transcriber = aai.Transcriber(config=config)
|
48 |
transcript = transcriber.transcribe(audio_path)
|
|
|
52 |
base_url = "https://api.cognitive.microsofttranslator.com"
|
53 |
endpoint = "/translate"
|
54 |
headers = {
|
55 |
+
"Ocp-Apim-Subscription-Key": "cd226bb1f3644276bea01d82dd861cbb",
|
56 |
"Content-Type": "application/json",
|
57 |
"Ocp-Apim-Subscription-Region": "southeastasia"
|
58 |
}
|