[アップデート] Amazon Transcribe Call Analyticsが生成AIの処理による通話要約をプレビューで提供開始 #AWSreInvent

2023.11.30

こんちには。

データアナリティクス事業本部 機械学習チームの中村です。

Amazon Transcribe Call Analyticsが生成AIの処理による通話要約をプレビューで提供開始しました。

要約によって通話の理由、問題解決のための手順、次のステップなどの重要な要素を把握することができ、エージェントのアフターコール業務の負担を減らしたり、スーパーバイザーによるレビューをスピードアップさせることが可能とのことです。

この通話要約機能は現在英語でサポートのみでサポートされています。

使用可能なリージョンは以下です。

  • US East (N. Virginia)
  • US West (Oregon)

公式ドキュメントとしては以下に説明があります。

本記事ではこの機能を実際に使ってみたいと思います。

注意点

試してみたところ本機能はステレオ音声(CustomerとAgentでそれぞれ)を入力する必要がありましたので、その点のみご留意下さい。

Pricing

価格については以下にあります。

Generative call summarization (Post call)という項目が今回の機能の料金となっています。(以下はUS East (N. Virginia)の例)

使ってみる

データの準備

英語のデータが手元になかったため、音声データについては以下で公開されているLibriSpeechのデータセット(LibriSpeech (c) 2014 by Vassil Panayotov)から音源を使います。

ここからtest-clean.tar.gzをダウンロードして./inputに展開して以下のスクリプトを実行してステレオのFLACファイルを作成しました。

(ffmpegコマンドにはPATHを通しておく必要があります)

rm -rf list.txt; touch list.txt
for i in `find ./input/test-clean.tar/LibriSpeech/test-clean/3729 | grep "flac" | sort`; do
    echo "file '$i'" >>list.txt
done

rm -rf concat_3729.flac
ffmpeg -f concat -safe 0 -i list.txt concat_3729.flac

rm -rf list.txt; touch list.txt
for i in `find ./input/test-clean.tar/LibriSpeech/test-clean/4507 | grep "flac" | sort`; do
    echo "file '$i'" >>list.txt
done

rm -rf concat_4507.flac
ffmpeg -f concat -safe 0 -i list.txt concat_4507.flac

rm -rf stereo.flac
ffmpeg -i concat_3729.flac -i concat_4507.flac -filter_complex "[0:a][1:a]amerge=inputs=2" audio.flac

こちらで作成されるaudio.flacファイルを任意のS3バケットにアップロードしておきます。

  • s3://{バケット名}/audio.flac

ジョブの作成

通話後分析をクリックして、「ジョブを作成」を押下します。

ジョブ設定を入力します。

入出力先を設定します。

IAMロールは新規作成として進めます。

次がポイントでoptinal設定の画面なのですが、ここで「概要を作成」を有効にしておく必要があります。

設定後、「ジョブを作成」を押下します。

すると進行中となりますので、少し待ちます。

結果の確認

以下のように完了後、ジョブ名をクリックします。

トランスクリプションのプレビューで、文字起こしデータと抽象要約を表示できます。

以下は文字起こしです。

こちらは抽象的要約の結果となります。

結果は以下のようなjsonとしてもダウンロードできます。抽象的要約もContactSummaryとして格納されていました。

{
    "AccountId":"{アカウントID}",
    "JobName":"cm-nakamura-tca",
    "LanguageCode":"en-US",
    "JobStatus":"COMPLETED",
    "Channel":"VOICE",
    "Participants":[
        {"ParticipantRole":"AGENT"},{"ParticipantRole":"CUSTOMER"}
    ],
    "ContentMetadata":{
        "Output":"Raw"
    },
    "Categories":{
        "MatchedCategories":[],
        "MatchedDetails":{}
    },
    "ConversationCharacteristics":{
        "TotalConversationDurationMillis":481660,
        "NonTalkTime":{"TotalTimeMillis":0,"Instances":[]},
        "TalkTime":{
            "TotalTimeMillis":897628,
            "DetailsByParticipant":{
                "AGENT":{"TotalTimeMillis":455409},
                "CUSTOMER":{"TotalTimeMillis":442219}
            }
        },
        "TalkSpeed":{
            "DetailsByParticipant":{
                "AGENT":{"AverageWordsPerMinute":126},
                "CUSTOMER":{"AverageWordsPerMinute":172}
            }
        },
        "Interruptions":{
            "TotalCount":53,"TotalTimeMillis":425520,
            "InterruptionsByInterrupter":{
                "AGENT":[
                    {"BeginOffsetMillis":17570,"EndOffsetMillis":21740,"DurationMillis":4170},
                    // ...中略...
                    {"BeginOffsetMillis":469770,"EndOffsetMillis":481340,"DurationMillis":11570}
                ],
                "CUSTOMER":[
                    {"BeginOffsetMillis":490,"EndOffsetMillis":16720,"DurationMillis":16230},
                    // ...中略...
                    {"BeginOffsetMillis":449010,"EndOffsetMillis":462600,"DurationMillis":13590}
                ]
            }
        },
        "Sentiment":{
            "OverallSentiment":{"AGENT":-1.5,"CUSTOMER":1.4},
            "SentimentByPeriod":{
                "QUARTER":{
                    "AGENT":[
                        {"BeginOffsetMillis":0,"EndOffsetMillis":120415,"Score":-3.0},
                        // ...中略...
                        {"BeginOffsetMillis":361245,"EndOffsetMillis":481660,"Score":-0.5}
                    ],
                    "CUSTOMER":[
                        {"BeginOffsetMillis":0,"EndOffsetMillis":120335,"Score":1.7},
                        // ...中略...
                        {"BeginOffsetMillis":361005,"EndOffsetMillis":481340,"Score":1.8}
                    ]
                }
            }
        },
        "ContactSummary":{
            "AutoGenerated":{
                "OverallSummary":{
                    "Content":"The customer wanted to learn French and asked the agent for recommendations on teachers. The agent offered to help teach the customer and have them translate passages. The customer was concerned they may be too difficult of a student and unable to pay well. The agent assured the customer they would help at an affordable rate and provide translations to practice with. The customer then provided a passage for the agent to translate to French as a sample."
                }
            }
        }
    },
    "Transcript":[
        {
            "ParticipantRole":"AGENT",
            "LoudnessScores":[78.63,81.94,55.22,82.06,82.18,79.35,82.2,86.1,82.44,80.71,82.52,84.8,81.11,80.4],
            "Content":"Chapter one origin it engenders a whole world la peg for which read theft and a hell lot peregrine for which read hunger.",
            "Items":[
                {"Type":"pronunciation","Confidence":"1.0","Content":"Chapter","BeginOffsetMillis":180,"EndOffsetMillis":650},
                // ...中略...
                {"Type":"punctuation","Confidence":"0.0","Content":"."}
            ],"BeginOffsetMillis":180,"EndOffsetMillis":13730,"Sentiment":"POSITIVE","Id":"f7984171-4ffd-4953-a389-deabe54c571b"
        },
        // ...中略...
        {
            "ParticipantRole":"CUSTOMER",
            "LoudnessScores":[84.68,85.53,75.94,77.9,76.53,76.63,76.01,77.18,72.89,66.98],
            "Content":"She never allowed him to be in need of anything and she gave no account of his money, which she kept altogether because he never asked her to render any accounts.",
            "Items":[
                {"Type":"pronunciation","Confidence":"1.0","Content":"She","BeginOffsetMillis":472320,"EndOffsetMillis":472540},
                // ...中略...
                {"Type":"punctuation","Confidence":"0.0","Content":"."}
            ],"BeginOffsetMillis":472320,"EndOffsetMillis":481340,"Sentiment":"NEUTRAL","Id":"01b2b4fc-0e59-42c9-b70a-1483a5ece216"
        }
    ]
}

まとめ

いかがでしたでしょうか。今回はプレビューとなった通話要約についてご紹介致しました。

本記事が、活用されようとする方の一助となれば幸いです。