diff --git a/apps/talk.c b/apps/talk.c
index c264bd7..b190271 100644
--- a/apps/talk.c
+++ b/apps/talk.c
@@ -736,9 +736,12 @@ bool talk_voice_required(void)
/* return size of voice file */
static int talk_get_buffer(void)
{
- int ret = voicefile_size;
#if CONFIG_CODEC == SWCODEC
+ int ret = voicefile_size;
ret += MAX_THUMBNAIL_BUFSIZE;
+#else
+ /* entire audio buffer is used */
+ int ret = audio_buffer_available();
#endif
return ret;
}