Skip to content

Commit bd428b0

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

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
@@ -104,6 +104,14 @@ def synthesize_audio(
104104
# 音声モードの場合、Whisper 設定を表示
105105
if input_output_mode == "音声":
106106
st.subheader("音声認識設定 (オプション)")
107+
audio_bytes = audio_recorder(
108+
text="クリックして音声入力👉️",
109+
recording_color="red",
110+
neutral_color="gray",
111+
icon_name="microphone",
112+
icon_size="2x",
113+
key="audio_input",
114+
)
107115
selected_model = st.sidebar.selectbox(
108116
"Whisperモデル",
109117
[
@@ -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)