Skip to content

Commit

Permalink
fix: include the other weird characters
Browse files Browse the repository at this point in the history
  • Loading branch information
naomi-lgbt committed Dec 19, 2024
1 parent f03246c commit f678f39
Show file tree
Hide file tree
Showing 3 changed files with 1,381 additions and 6 deletions.
5 changes: 4 additions & 1 deletion Deepgram/Clients/Speak/v2/WebSocket/Client.cs
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,10 @@ public void SpeakWithText(string text)
{
TextSource textSource = new TextSource(text.Replace("\r\n", "\\n")
.Replace("\n", "\\n")
.Replace("\"", "\\\""));
.Replace("\"", "\\\"")
.Replace("\b", "\\b")
.Replace("\f", "\\f")
.Replace("\t", "\\t"));
byte[] byteArray = Encoding.UTF8.GetBytes(textSource.ToString());
SendMessage(byteArray);
}
Expand Down
Loading

0 comments on commit f678f39

Please sign in to comment.