We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
お世話になっております 齋藤です
音声認識で利用しているtranscribeにおいて、startTranscription.tsをStartTranscriptionJobCommandを以下の通りに修正をしてみました
const command = new StartTranscriptionJobCommand({ IdentifyLanguage: true, LanguageOptions: ['ja-JP', 'en-US'], Media: { MediaFileUri: audioUrl }, TranscriptionJobName: uuid, OutputBucketName: process.env.TRANSCRIPT_BUCKET_NAME, Settings: { ShowSpeakerLabels: true, // 話者のラベルを表示する設定を有効にします MaxSpeakerLabels: 2 // 識別する話者の最大数 }, Tags: [ { Key: 'userId', Value: userId, }, ], });
上記の結果、transcribeで音声認識をされたデータに関しては、json形式でS3バケットに話者特定をして保存されるのですが、getTranscription.tsで取得したデータは話者特定を行わず、音声認識をしたデータのみをweb画面上に表示しています
想定として、getTranscription.tsで取得したjsonを話者特定をしてパースしてweb上に表示できるようにしないと行けないとおもうのですが、どのようにすれば話者特定をした結果をwebに反映できるでしょうか
ご教授をよろしくおねがい申し上げます
The text was updated successfully, but these errors were encountered:
添付していただいたコードのように修正することで、話者識別と合わせた音声認識をすることができます。
Amazon Transcribe の認識結果は以下の json ような形式になります。現在の getTranscription.ts では、results.transcripts の情報をそのままフロントエンドで可視化していますが、話者情報と合わせて可視化するためには、results.items や results.speaker_lables の情報を参照する必要があります。
getTranscription.ts
results.transcripts
results.items
results.speaker_lables
{ "results": { "transcripts": [ { "transcript": "..." } ], "speaker_labels": { "segments": [ { "start_time": "0.0", "end_time": "8.779", "speaker_label": "spk_0", "items": [] } ] }, "items": [ { "type": "pronunciation", "alternatives": [ { "confidence": "0.999", "content": "After" } ], "start_time": "0.009", "end_time": "0.389", "speaker_label": "spk_0" }, { "type": "pronunciation", "alternatives": [ { "confidence": "0.999", "content": "living" } ], "start_time": "0.4", "end_time": "0.689", "speaker_label": "spk_0" }, ] } }
Sorry, something went wrong.
No branches or pull requests
お世話になっております
齋藤です
音声認識で利用しているtranscribeにおいて、startTranscription.tsをStartTranscriptionJobCommandを以下の通りに修正をしてみました
上記の結果、transcribeで音声認識をされたデータに関しては、json形式でS3バケットに話者特定をして保存されるのですが、getTranscription.tsで取得したデータは話者特定を行わず、音声認識をしたデータのみをweb画面上に表示しています
想定として、getTranscription.tsで取得したjsonを話者特定をしてパースしてweb上に表示できるようにしないと行けないとおもうのですが、どのようにすれば話者特定をした結果をwebに反映できるでしょうか
ご教授をよろしくおねがい申し上げます
The text was updated successfully, but these errors were encountered: