# Encoding issue with mimic3-server (Latin-1 vs UTF-8)

**URL:** https://community.openconversational.ai/t/encoding-issue-with-mimic3-server-latin-1-vs-utf-8/13980
**Category:** Mimic
**Created:** [October 20, 2023, 9:15pm UTC](https://community.openconversational.ai/t/encoding-issue-with-mimic3-server-latin-1-vs-utf-8/13980 "2023-10-20T21:15:48Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![regivanx](https://community.openconversational.ai/user_avatar/community.openconversational.ai/regivanx/32/4443_2.png) [@regivanx](https://community.openconversational.ai/u/regivanx)
#### Post date: [October 20, 2023, 9:15pm UTC](https://community.openconversational.ai/t/encoding-issue-with-mimic3-server-latin-1-vs-utf-8/13980/1 "2023-10-20T21:15:48Z")

</div>

Hi!

I have an encoding issue with mimic3-server:

```auto
$ mimic3 --remote --voice 'en_UK/apope_low' "I don’t speak English" | aplay --quiet
Reading text from stdin...
Traceback (most recent call last):
  File "mimic3.py", line 40, in <module>
  File "mimic3_tts/ __main__.py", line 129, in main
  File "mimic3_tts/ __main__.py", line 450, in process_lines
  File "mimic3_tts/ __main__.py", line 397, in process_line
  File "mimic3_tts/ __main__.py", line 587, in get_remote_wav_bytes
  File "requests/api.py", line 115, in post
  File "requests/api.py", line 59, in request
  File "requests/sessions.py", line 587, in request
  File "requests/sessions.py", line 701, in send
  File "requests/adapters.py", line 489, in send
  File "urllib3/connectionpool.py", line 703, in urlopen
  File "urllib3/connectionpool.py", line 398, in _make_request
  File "urllib3/connection.py", line 239, in request
  File "http/client.py", line 1255, in request
  File "http/client.py", line 1300, in _send_request
  File "http/client.py", line 164, in _encode
UnicodeEncodeError: 'latin-1' codec can't encode character '\u2019' in position 5: Body ('’') is not valid Latin-1. Use body.encode('utf-8') if you want to send it encoded in UTF-8.
[582387] Failed to execute script 'mimic3' due to unhandled exception!
aplay: read_header:2931: erreur de lecture

```

However, there is no issue with mimic3:

```auto
$ mimic3 --voice 'en_UK/apope_low' "I don’t speak English" | aplay --quiet
Reading text from stdin...
INFO:mimic3_tts.tts:Loaded voice from /usr/share/mycroft/mimic3/voices/en_UK/apope_low

```

The error message states: “Use body.encode(‘utf-8’) if you want to send it encoded in UTF-8.” but I don’t know how do this. I simply run the server with the command:

```auto
$ mimic3-server --num-threads 6

```

I couldn’t find the option to tell the server that the input is utf-8 encoded. Here the versions of mimic3 and mimic3-server:

```auto
$ mimic3 --version
0.2.3
$ mimic3-server --version
0.1.1

```

Here are my locales et system:

```auto
$ env | grep LANG
LANG=fr_FR.utf8
GDM_LANG=fr_FR.utf8
$ lsb_release -a
LSB Version: n/a
Distributor ID: Manjaro-ARM
Description: Manjaro ARM Linux
Release: 23.02
Codename: n/a

```

---

<div class="post-metadata">

### Author: ![regivanx](https://community.openconversational.ai/user_avatar/community.openconversational.ai/regivanx/32/4443_2.png) [@regivanx](https://community.openconversational.ai/u/regivanx)
#### Post date: [October 23, 2023, 9:01am UTC](https://community.openconversational.ai/t/encoding-issue-with-mimic3-server-latin-1-vs-utf-8/13980/2 "2023-10-23T09:01:41Z")

</div>

Okay, I’ll give a tip to get around the issue.

```auto
echo "I don’t speak English" | iconv -f UTF-8 -t ISO-8859-1//TRANSLIT | mimic3 --remote --voice 'en_UK/apope_low' | aplay --quiet

```

This converts UTF-8 strings to ISO-8859-1 (i.e. Latin-1) while attempting to transcribe unrecognized characters, like `"’"`.

I think this is a bug, because mimic3-server should accept UTF-8 encoding, as mimic3 does without problem.

---

<div class="post-metadata">

### Author: ![goldyfruit](https://community.openconversational.ai/user_avatar/community.openconversational.ai/goldyfruit/32/2741_2.png) [@goldyfruit](https://community.openconversational.ai/u/goldyfruit)
#### Post date: [October 23, 2023, 12:24pm UTC](https://community.openconversational.ai/t/encoding-issue-with-mimic3-server-latin-1-vs-utf-8/13980/3 "2023-10-23T12:24:38Z")

</div>

Hi @regivanx

Mimic3 is not maintained anymore as Mycroft AI went down.

> [@FAQ: OVOS, Neon, and the Future of the Mycroft Voice Assistant](https://community.openconversational.ai/t/faq-ovos-neon-and-the-future-of-the-mycroft-voice-assistant/13496):
>
> FAQ Hello! I’m Chance from OVOS, here to clear up some frequent questions and concerns (such as, what’s OVOS?). …and I’m Clary from Neon AI, your collaboration-supporting forum admin. I’m here to help, please reach out if you have an idea to improve this collaborative space, or need my support to create a wiki or other feature. I’m here to help. This post is a Wiki, which means we welcome contributions from community members. Please feel free to ask either of us any follow-up questions below…

---

<div class="post-metadata">

### Author: ![ChanceNCounter](https://community.openconversational.ai/user_avatar/community.openconversational.ai/chancencounter/32/1965_2.png) [@ChanceNCounter](https://community.openconversational.ai/u/ChanceNCounter)
#### Post date: [October 23, 2023, 4:59pm UTC](https://community.openconversational.ai/t/encoding-issue-with-mimic3-server-latin-1-vs-utf-8/13980/4 "2023-10-23T16:59:14Z")

</div>

We are currently recommending that most self-hosters move to Piper from Rhasspy, whose lead dev was Mycroft’s lead dev when Mimic3 was written and which can (perhaps consequently) be regarded as a spiritual successor to Mimic.

OVOS devices configured to use public Mimic3 servers are currently hitting a handful of instances maintained by our community - including Goldyfruit there - as a courtesy. There’s no sunset date, but they can’t possibly stay up forever.
