Skip to content

Commit e557b71

Browse files
tbrandtbrandaws
andauthored
Support Nova Sonic (#1013)
Co-authored-by: Taichiro Suzuki <[email protected]>
1 parent 5174220 commit e557b71

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+2957
-43
lines changed

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,10 @@ GenU provides a variety of standard use cases leveraging generative AI. These us
7777
<td>Diagram Generation</td>
7878
<td>Diagram generation visualizes text and content on any topic using optimal diagrams. It allows for easy text-based diagram creation, enabling efficient creation of flowcharts and other diagrams even for non-programmers and non-designers.</td>
7979
</tr>
80+
<tr>
81+
<td>Voice Chat</td>
82+
<td>In Voice Chat, you can have a bidirectional voice chat with generative AI. Similar to natural conversation, you can also interrupt and speak while the AI is talking. Also, by setting a system prompt, you can have voice conversations with AI that has specific roles.</td>
83+
</tr>
8084
</tbody>
8185
</table>
8286
</details>

README_ja.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,10 @@ GenU は生成 AI を活用した多様なユースケースを標準で提供
7575
<td>ダイアグラム生成</td>
7676
<td>ダイアグラム生成は、あらゆるトピックに関する文章や内容を最適な図を用いて視覚化します。 テキストベースで簡単に図を生成でき、プログラマーやデザイナーでなくても効率的にフローチャートなどの図を作成できます。</td>
7777
</tr>
78+
<tr>
79+
<td>音声チャット</td>
80+
<td>音声チャットでは生成 AI と双方向の音声によるチャットが可能です。自然な会話と同様、AI の発言中に割り込んで話すこともできます。また、システムプロンプトを設定することで、特定の役割を持った AI と音声で会話することもできます。</td>
81+
</tr>
7882
</tbody>
7983
</table>
8084
</details>
1.32 MB
Loading

docs/en/DEPLOY_ON_CLOUDSHELL.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,4 +79,4 @@ When deployment is complete, the CloudFront URL will be displayed. You can acces
7979
2. cdk.json settings are applied next
8080

8181
Note that to execute these steps, you also need to enable the models from [Amazon Bedrock Model access](https://console.aws.amazon.com/bedrock/home#/modelaccess).
82-
Confirm that the models specified in modelIds, imageGenerationModelIds, and videoGenerationModelIds in the modelRegion of the configuration file (parameter.ts or cdk.json) are enabled.
82+
Confirm that the models specified in modelIds, imageGenerationModelIds, videoGenerationModelIds, and speechToSpeechModelIds in the modelRegion of the configuration file (parameter.ts or cdk.json) are enabled.

docs/en/DEPLOY_OPTION.md

Lines changed: 32 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -619,6 +619,15 @@ const envs: Record<string, Partial<StackInput>> = {
619619
}
620620
```
621621

622+
### Enabling Voice Chat Use Case
623+
624+
> [!NOTE]
625+
> The response speed of voice chat is greatly affected by the application's region (the region where GenerativeAiUseCasesStack is deployed). If there is a delay in response, please check if the user is physically located close to the application's region.
626+
627+
This is enabled when you define one or more models in `speechToSpeechModelIds`.
628+
For `speechToSpeechModelIds`, please refer to [Changing Amazon Bedrock Models](#change-amazon-bedrock-models).
629+
For default values, please refer to [packages/cdk/lib/stack-input.ts](/packages/cdk/lib/stack-input.ts).
630+
622631
### Enabling Image Generation Use Case
623632

624633
This is enabled when you define one or more models in `imageGenerationModelIds`.
@@ -728,6 +737,7 @@ const envs: Record<string, Partial<StackInput>> = {
728737
video: true, // Hide video generation
729738
videoAnalyzer: true, // Hide video analysis
730739
diagram: true, // Hide diagram generation
740+
voiceChat: true, // Hide voice chat
731741
},
732742
},
733743
};
@@ -748,7 +758,8 @@ const envs: Record<string, Partial<StackInput>> = {
748758
"image": true,
749759
"video": true,
750760
"videoAnalyzer": true,
751-
"diagram": true
761+
"diagram": true,
762+
"voiceChat": true
752763
}
753764
}
754765
}
@@ -782,7 +793,7 @@ const envs: Record<string, Partial<StackInput>> = {
782793

783794
## Change Amazon Bedrock Models
784795

785-
Specify the model region and models in `parameter.ts` or `cdk.json` using `modelRegion`, `modelIds`, `imageGenerationModelIds`, and `videoGenerationModelIds`. For `modelIds`, `imageGenerationModelIds`, and `videoGenerationModelIds`, specify a list of models you want to use from those available in the specified region. AWS documentation provides a [list of models](https://docs.aws.amazon.com/bedrock/latest/userguide/model-ids.html) and [model support by region](https://docs.aws.amazon.com/bedrock/latest/userguide/models-regions.html).
796+
Specify the model region and models in `parameter.ts` or `cdk.json` using `modelRegion`, `modelIds`, `imageGenerationModelIds`, `videoGenerationModelIds`, and `speechToSpeechModelIds`. For `modelIds`, `imageGenerationModelIds`, `videoGenerationModelIds`, and `speechToSpeechModelIds`, specify a list of models you want to use from those available in the specified region. AWS documentation provides a [list of models](https://docs.aws.amazon.com/bedrock/latest/userguide/model-ids.html) and [model support by region](https://docs.aws.amazon.com/bedrock/latest/userguide/models-regions.html).
786797

787798
The solution also supports [cross-region inference](https://docs.aws.amazon.com/bedrock/latest/userguide/cross-region-inference-support.html) models. Cross-region inference models are represented as `{us|eu|apac}.{model-provider}.{model-name}` and must match the `{us|eu|apac}` prefix with the region specified in modelRegion.
788799

@@ -854,6 +865,12 @@ This solution supports the following text generation models:
854865
"apac.amazon.nova-micro-v1:0"
855866
```
856867

868+
This solution supports the following speech-to-speech models:
869+
870+
```
871+
amazon.nova-sonic-v1:0
872+
```
873+
857874
This solution supports the following image generation models:
858875

859876
```
@@ -881,7 +898,7 @@ This solution supports the following video generation models:
881898

882899
### Using Models from Multiple Regions Simultaneously
883900

884-
By default, GenU uses models from the `modelRegion`. If you want to use the latest models that are only available in certain regions, you can specify `{modelId: '<model name>', region: '<region code>'}` in `modelIds`, `imageGenerationModelIds`, or `videoGenerationModelIds` to call that specific model from the specified region.
901+
By default, GenU uses models from the `modelRegion`. If you want to use the latest models that are only available in certain regions, you can specify `{modelId: '<model name>', region: '<region code>'}` in `modelIds`, `imageGenerationModelIds`, `videoGenerationModelIds`, or `speechToSpeechModelIds` to call that specific model from the specified region.
885902

886903
> [!NOTE]
887904
> When using both the [monitoring dashboard](#enabling-monitoring-dashboard) and models from multiple regions, the default dashboard settings will not display prompt logs for models outside the primary region (`modelRegion`).
@@ -936,6 +953,9 @@ const envs: Record<string, Partial<StackInput>> = {
936953
'amazon.nova-reel-v1:0',
937954
{ modelId: 'luma.ray-v2:0', region: 'us-west-2' },
938955
],
956+
speechToSpeechModelIds: [
957+
{ modelId: 'amazon.nova-sonic-v1:0', region: 'us-east-1' },
958+
],
939959
},
940960
};
941961
```
@@ -1003,6 +1023,12 @@ const envs: Record<string, Partial<StackInput>> = {
10031023
"region": "us-west-2"
10041024
}
10051025
]
1026+
"speechToSpeechModelIds": [
1027+
{
1028+
"modelId": "amazon.nova-sonic-v1:0",
1029+
"region": "us-east-1"
1030+
}
1031+
]
10061032
}
10071033
}
10081034
```
@@ -1038,6 +1064,7 @@ const envs: Record<string, Partial<StackInput>> = {
10381064
'stability.stable-diffusion-xl-v1',
10391065
],
10401066
videoGenerationModelIds: ['amazon.nova-reel-v1:1'],
1067+
speechToSpeechModelIds: ['amazon.nova-sonic-v1:0'],
10411068
},
10421069
};
10431070
```
@@ -1069,7 +1096,8 @@ const envs: Record<string, Partial<StackInput>> = {
10691096
"amazon.titan-image-generator-v1",
10701097
"stability.stable-diffusion-xl-v1"
10711098
],
1072-
"videoGenerationModelIds": ["amazon.nova-reel-v1:1"]
1099+
"videoGenerationModelIds": ["amazon.nova-reel-v1:1"],
1100+
"speechToSpeechModelIds": ["amazon.nova-sonic-v1:0"]
10731101
}
10741102
}
10751103
```

docs/ja/DEPLOY_ON_CLOUDSHELL.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,4 +79,4 @@ deploy.sh は以下のオプションをサポートしています:
7979
2. cdk.json の設定が次に適用されます
8080

8181
なお、これらの手順を実行する場合も [Amazon Bedrock の Model access](https://console.aws.amazon.com/bedrock/home#/modelaccess) から利用するモデルの有効化が必要です。
82-
使用する設定ファイル(parameter.ts または cdk.json)の modelRegion において modelIds と imageGenerationModelIds と videoGenerationModelIds で指定されたモデルが有効化されているかを確認してください。
82+
使用する設定ファイル(parameter.ts または cdk.json)の modelRegion において modelIds と imageGenerationModelIds と videoGenerationModelIds と speechToSpeechModelIds で指定されたモデルが有効化されているかを確認してください。

docs/ja/DEPLOY_OPTION.md

Lines changed: 32 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -634,6 +634,15 @@ const envs: Record<string, Partial<StackInput>> = {
634634
}
635635
```
636636

637+
### 音声チャットユースケースの有効化
638+
639+
> [!NOTE]
640+
> 音声チャットの反応速度はアプリケーションのリージョン (GenerativeAiUseCasesStack がデプロイされたリージョン) に大きく影響を受けます。反応が遅延する場合は、ユーザーがアプリケーションのリージョンと物理的に近い距離にいるかを確認してください。
641+
642+
`speechToSpeechModelIds` にモデルを 1 つ以上定義すると有効化されます。
643+
`speechToSpeechModelIds` に関しては [Amazon Bedrock のモデルを変更する](#amazon-bedrock-のモデルを変更する) をご参照ください。
644+
デフォルト値は [packages/cdk/lib/stack-input.ts](/packages/cdk/lib/stack-input.ts) をご参照ください。
645+
637646
### 画像生成ユースケースの有効化
638647

639648
`imageGenerationModelIds` にモデルを 1 つ以上定義すると有効化されます。
@@ -743,6 +752,7 @@ const envs: Record<string, Partial<StackInput>> = {
743752
video: true, // 動画生成を非表示
744753
videoAnalyzer: true, // 映像分析を非表示
745754
diagram: true, // ダイアグラム生成を非表示
755+
voiceChat: true, // 音声チャットを非表示
746756
},
747757
},
748758
};
@@ -763,7 +773,8 @@ const envs: Record<string, Partial<StackInput>> = {
763773
"image": true,
764774
"video": true,
765775
"videoAnalyzer": true,
766-
"diagram": true
776+
"diagram": true,
777+
"voiceChat": true
767778
}
768779
}
769780
}
@@ -797,7 +808,7 @@ const envs: Record<string, Partial<StackInput>> = {
797808

798809
## Amazon Bedrock のモデルを変更する
799810

800-
`parameter.ts` もしくは `cdk.json``modelRegion`, `modelIds`, `imageGenerationModelIds`, `videoGenerationModelIds` でモデルとモデルのリージョンを指定します。`modelIds``imageGenerationModelIds``videoGenerationModelIds` は指定したリージョンで利用できるモデルの中から利用したいモデルのリストで指定してください。AWS ドキュメントに、[モデルの一覧](https://docs.aws.amazon.com/bedrock/latest/userguide/model-ids.html)[リージョン別のモデルサポート一覧](https://docs.aws.amazon.com/bedrock/latest/userguide/models-regions.html)があります。
811+
`parameter.ts` もしくは `cdk.json``modelRegion`, `modelIds`, `imageGenerationModelIds`, `videoGenerationModelIds`, `speechToSpeechModelIds` でモデルとモデルのリージョンを指定します。`modelIds``imageGenerationModelIds``videoGenerationModelIds``speechToSpeechModelIds` は指定したリージョンで利用できるモデルの中から利用したいモデルのリストで指定してください。AWS ドキュメントに、[モデルの一覧](https://docs.aws.amazon.com/bedrock/latest/userguide/model-ids.html)[リージョン別のモデルサポート一覧](https://docs.aws.amazon.com/bedrock/latest/userguide/models-regions.html)があります。
801812

802813
また、[cross-region inference](https://docs.aws.amazon.com/bedrock/latest/userguide/cross-region-inference-support.html)のモデルに対応しています。cross-region inference のモデルは `{us|eu|apac}.{model-provider}.{model-name}` で表されるモデルで、設定した modelRegion で指定したリージョンの `{us|eu|apac}` と一致している必要があります。
803814

@@ -869,6 +880,12 @@ const envs: Record<string, Partial<StackInput>> = {
869880
"apac.amazon.nova-micro-v1:0"
870881
```
871882

883+
このソリューションが対応している speech-to-speech モデルは以下です。
884+
885+
```
886+
amazon.nova-sonic-v1:0
887+
```
888+
872889
このソリューションが対応している画像生成モデルは以下です。
873890

874891
```
@@ -896,7 +913,7 @@ const envs: Record<string, Partial<StackInput>> = {
896913

897914
### 複数のリージョンのモデルを同時に利用する
898915

899-
GenU では、特に指定がない限り`modelRegion`のモデルを使用します。一部リージョンのみで利用可能な最新モデル等を使いたい場合、`modelIds`または`imageGenerationModelIds`または`videoGenerationModelIds``{modelId: '<モデル名>', region: '<リージョンコード>'}`を指定することで、そのモデルのみ指定したリージョンから呼び出すことができます。
916+
GenU では、特に指定がない限り`modelRegion`のモデルを使用します。一部リージョンのみで利用可能な最新モデル等を使いたい場合、`modelIds`または`imageGenerationModelIds`または`videoGenerationModelIds`または`speechToSpeechModelIds``{modelId: '<モデル名>', region: '<リージョンコード>'}`を指定することで、そのモデルのみ指定したリージョンから呼び出すことができます。
900917

901918
> [!NOTE] > [モニタリング用ダッシュボード](#モニタリング用のダッシュボードの有効化)と複数リージョンのモデル利用を併用する場合、デフォルトのダッシュボード設定では主リージョン(`modelRegion`で指定したリージョン)以外のモデルのプロンプトログが表示されません。
902919
>
@@ -944,6 +961,9 @@ const envs: Record<string, Partial<StackInput>> = {
944961
'amazon.nova-reel-v1:0',
945962
{ modelId: 'luma.ray-v2:0', region: 'us-west-2' },
946963
],
964+
speechToSpeechModelIds: [
965+
{ modelId: 'amazon.nova-sonic-v1:0', region: 'us-east-1' },
966+
],
947967
},
948968
};
949969
```
@@ -1010,6 +1030,12 @@ const envs: Record<string, Partial<StackInput>> = {
10101030
"modelId": "luma.ray-v2:0",
10111031
"region": "us-west-2"
10121032
}
1033+
],
1034+
"speechToSpeechModelIds": [
1035+
{
1036+
"modelId": "amazon.nova-sonic-v1:0",
1037+
"region": "us-east-1"
1038+
}
10131039
]
10141040
}
10151041
}
@@ -1045,6 +1071,7 @@ const envs: Record<string, Partial<StackInput>> = {
10451071
'stability.stable-diffusion-xl-v1',
10461072
],
10471073
videoGenerationModelIds: ['amazon.nova-reel-v1:1'],
1074+
speechToSpeechModelIds: ['amazon.nova-sonic-v1:0'],
10481075
},
10491076
};
10501077
```
@@ -1076,7 +1103,8 @@ const envs: Record<string, Partial<StackInput>> = {
10761103
"amazon.titan-image-generator-v1",
10771104
"stability.stable-diffusion-xl-v1"
10781105
],
1079-
"videoGenerationModelIds": ["amazon.nova-reel-v1:1"]
1106+
"videoGenerationModelIds": ["amazon.nova-reel-v1:1"],
1107+
"speechToSpeechModelIds": ["amazon.nova-sonic-v1:0"]
10801108
}
10811109
}
10821110
```

docs/overrides/home_en.html

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -202,6 +202,22 @@ <h3 class="mb-2 text-xl font-semibold">Flow Chat</h3>
202202
</p>
203203
</div>
204204
</div>
205+
<div class="swiper-slide">
206+
<div class="rounded-lg bg-white p-6 shadow-lg">
207+
<img
208+
src="../assets/images/usecase_voice_chat.gif"
209+
alt="Text Generation"
210+
class="mb-4 w-full rounded-lg" />
211+
<h3 class="mb-2 text-xl font-semibold">Voice Chat</h3>
212+
<p class="text-sm text-gray-600">
213+
In Voice Chat, you can have a bidirectional voice chat with
214+
generative AI. Similar to natural conversation, you can also
215+
interrupt and speak while the AI is talking. Also, by setting a
216+
system prompt, you can have voice conversations with AI that has
217+
specific roles.
218+
</p>
219+
</div>
220+
</div>
205221
<div class="swiper-slide">
206222
<div class="rounded-lg bg-white p-6 shadow-lg">
207223
<img

docs/overrides/home_ja.html

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -193,6 +193,21 @@ <h3 class="mb-2 text-xl font-semibold">Flow チャット</h3>
193193
</p>
194194
</div>
195195
</div>
196+
<div class="swiper-slide">
197+
<div class="rounded-lg bg-white p-6 shadow-lg">
198+
<img
199+
src="../assets/images/usecase_voice_chat.gif"
200+
alt="Text Generation"
201+
class="mb-4 w-full rounded-lg" />
202+
<h3 class="mb-2 text-xl font-semibold">音声チャット</h3>
203+
<p class="text-sm text-gray-600">
204+
音声チャットでは生成 AI
205+
と双方向の音声によるチャットが可能です。自然な会話と同様、AI
206+
の発言中に割り込んで話すこともできます。また、システムプロンプトを設定することで、特定の役割を持った
207+
AI と音声で会話することもできます。
208+
</p>
209+
</div>
210+
</div>
196211
<div class="swiper-slide">
197212
<div class="rounded-lg bg-white p-6 shadow-lg">
198213
<img

0 commit comments

Comments
 (0)