- 最新
- 投票最多
- 评论最多
Q1 : Is it possible to directly transcribe it from the url? Or do I first have to download it to a bucket.
A1 : From this documentation[1], it is mentioned that Amazon Transcribe takes audio data, as a media file in an Amazon S3 bucket or a media stream, and converts it to text data. If you're transcribing media files stored in an Amazon S3 bucket, you're performing batch transcriptions. If you're transcribing media streams, you're performing streaming transcriptions. These two processes have different rules and requirements. You may also use Sagemaker JumpStart to deploy LLM/Models to do the summarization[2] and it is very straightforward process
Q 2: Trough the AWS Console I can let transcribe auto detect the language, is this also possible with the Javascript sdk?
A2 : You can also add custom vocabulary for the languages. Please take a look on the code snippet :
"use strict"; import { StartTranscriptionJobCommand } from "@aws-sdk/client-transcribe"; import { TranscribeClient } from "@aws-sdk/client-transcribe"; const REGION = "us-east-1"; const BUCKET = "YOUR_BUCKET"; const KEY = "YOUR_FILE"; const transcribeClient = new TranscribeClient({ region: REGION }); let random = (Math.random() + 1).toString(36).substring(7); console.log('key = ' + KEY); export const params = { IdentifyLanguage: true, LanguageOptions: ['en-US','fr-FR'], LanguageIdSettings: { "en-US" : { VocabularyName: "custom-vocab-en_US" }, "fr-FR" : { VocabularyName: "custom-vocab-fr_FR" } }, Media: { MediaFileUri: `https://s3-${REGION}.amazonaws.com/${BUCKET}/${KEY}` }, MediaFormat: 'mp3', TranscriptionJobName: `Transcribe-Job-${random}`, OutputBucketName: 'YOUR_BUCKET' }; export const run = async () => { try { const data = await transcribeClient.send( new StartTranscriptionJobCommand(params) ); console.log("Success - put", data); return data; } catch (err) { console.log("Error", err); } }; run();
Resources : [1] - https://docs.aws.amazon.com/transcribe/latest/dg/how-input.html
[2] - https://docs.aws.amazon.com/sagemaker/latest/dg/studio-jumpstart.html
相关内容
- AWS 官方已更新 3 年前
- AWS 官方已更新 10 个月前