diff --git a/Cargo.toml b/Cargo.toml
index 9c7cf09..6ebb8e8 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -8,5 +8,4 @@ edition = "2021"
repository = "https://github.com/pykeio/ssml"
[dependencies]
-anyhow = "1.0"
dyn-clone = "1.0"
diff --git a/README.md b/README.md
index 6f467d8..5852dd1 100644
--- a/README.md
+++ b/README.md
@@ -7,6 +7,9 @@ Currently, `ssml-rs` focuses on supporting the subsets of SSML supported by majo
let doc = ssml::speak(Some("en-US"), ["Hello, world!"]);
use ssml::Serialize;
-let str = doc.serialize_to_string(ssml::Flavor::AmazonPolly)?;
-assert_eq!(str, r#"Hello, world!"#);
+let str = doc.serialize_to_string(&ssml::SerializeOptions::default().flavor(Flavor::AmazonPolly))?;
+assert_eq!(
+ str,
+ r#"Hello, world!"#
+);
```
diff --git a/src/audio.rs b/src/audio.rs
index 7f8c2b9..a2842cc 100644
--- a/src/audio.rs
+++ b/src/audio.rs
@@ -1,9 +1,6 @@
-use std::io::Write;
-
use crate::{
- speak::Element,
unit::{Decibels, TimeDesignation},
- util, Flavor, Serialize
+ util, Element, Flavor, Serialize, SerializeOptions, XmlWriter
};
/// Specify repeating an [`Audio`] element's playback for a certain number of times, or for a determined duration.
@@ -148,52 +145,48 @@ impl Audio {
}
impl Serialize for Audio {
- fn serialize(&self, writer: &mut W, flavor: Flavor) -> anyhow::Result<()> {
- writer.write_all(b"