Skip to content

Commit ad94cb0

Browse files
committed
move audio input button to sidebar
1 parent f69d583 commit ad94cb0

File tree

1 file changed

+8
-10
lines changed

1 file changed

+8
-10
lines changed

template_langgraph/services/streamlits/pages/chat_with_tools_agent.py

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,14 @@ def synthesize_audio(
156156
max_value=10,
157157
value=0,
158158
)
159+
audio_bytes = audio_recorder(
160+
text="クリックして音声入力",
161+
recording_color="red",
162+
neutral_color="gray",
163+
icon_name="microphone",
164+
icon_size="2x",
165+
key="audio_input",
166+
)
159167

160168
st.divider()
161169
st.subheader("使用するツール")
@@ -206,16 +214,6 @@ def synthesize_audio(
206214
prompt_files = []
207215

208216
if input_output_mode == "音声":
209-
st.subheader("🎤 音声入力")
210-
audio_bytes = audio_recorder(
211-
text="クリックして録音",
212-
recording_color="red",
213-
neutral_color="gray",
214-
icon_name="microphone",
215-
icon_size="2x",
216-
key="audio_input",
217-
)
218-
219217
if audio_bytes:
220218
st.audio(audio_bytes, format="audio/wav")
221219

0 commit comments

Comments
 (0)