Skip to content
Discussion options

You must be logged in to vote

After trying it, I found a solution for your reference. Just set "release_mode=ft.audio.ReleaseMode.STOP". At this time, the same audio file can be played repeatedly on the Android system, which is great. The program code is as follows:

import flet as ft
async def main(page: ft.Page):
page.horizontal_alignment = ft.CrossAxisAlignment.CENTER
page.appbar = ft.AppBar(title=ft.Text("Audio Recorder"), center_title=True)
page.on_error = lambda e: print(e.data)

path = "talk/passenger.m4a" 
url_1= "talk/MetroMLT1.mp3"
url_2= "talk/staff_to_passenger.mp3"

async def handle_start_recording(e):
    await audio_rec.start_recording_async(path)
async def handle_stop_recording(e):
    output_path = awai…

Replies: 3 comments 6 replies

Comment options

You must be logged in to vote
4 replies
@jkloip
Comment options

@jkloip
Comment options

@jkloip
Comment options

@jkloip
Comment options

Comment options

You must be logged in to vote
0 replies
Answer selected by ndonkoHenri
Comment options

You must be logged in to vote
2 replies
@jkloip
Comment options

@JosueJBA
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
help wanted Extra attention is needed
3 participants