AudioManagerService class

Main service that integrates both audio conversion and playback Provides a unified interface for text-to-audio workflow

Constructors

AudioManagerService()

Properties

audioPlayer BNSAudioPlayer
no setter
config AudioConversionConfig
no setter
currentChapterContent String?
no setter
currentChapterId String?
no setter
currentState AudioState
no setter
hasError bool
no setter
hashCode int
The hash code for this object.
no setterinherited
isConverting bool
no setter
isIdle bool
no setter
isPaused bool
no setter
isPlaying bool
no setter
isReady bool
no setter
onChapterCompleted ↔ dynamic Function()?
getter/setter pair
onConversionProgress ↔ dynamic Function(ConversionProgress)?
getter/setter pair
onError ↔ dynamic Function(String)?
getter/setter pair
onPlaybackProgress ↔ dynamic Function(PlaybackProgress)?
getter/setter pair
onStateChanged ↔ dynamic Function(AudioState)?
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

clearAllCache() Future<void>
Clear all audio cache
clearChapterCache(String chapterId) Future<bool>
Clear audio cache for specific chapter
dispose() Future<void>
Dispose resources
formatCacheSize(int bytes) String
Format cache size for display
getAudioFileInfo(String chapterId) Future<Map<String, dynamic>?>
Get audio file info
getCacheSize() Future<int>
Get total cache size
getProgress() PlaybackProgress
Get current playback progress
hasAudioCache(String chapterId) Future<bool>
Check if chapter has cached audio
initialize() Future<void>
Initialize the audio manager
loadChapter({required String chapterId, required String chapterContent, AudioConversionConfig? config, bool forceReconvert = false}) Future<void>
Load a chapter for audio conversion and playback
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
pause() Future<void>
Pause playback
play() Future<void>
Start or resume playback
preloadChapter({required String chapterId, required String chapterContent, AudioConversionConfig? config, dynamic onProgress(ConversionProgress)?}) Future<ConversionResult>
Preload chapter audio (convert without playing)
seek(Duration position) Future<void>
Seek to specific position
setSpeed(double speed) Future<void>
Set playback speed
setVolume(double volume) Future<void>
Set volume
stop() Future<void>
Stop playback
toString() String
A string representation of this object.
inherited
updateConfig(AudioConversionConfig newConfig) → void
Update audio configuration

Operators

operator ==(Object other) bool
The equality operator.
inherited