PageSourceSearch

https://osmand.net/assets/js/7fbb94cf.4fbda1d5.js

js osmand.net collected 2026-09-24 08:34:23 UTC 6,826 bytes, 1 lines download raw bytes

1"use strict";(globalThis.webpackChunkosmand_web=globalThis.webpackChunkosmand_web||[]).push([[18016],{551309(e,n,t){t.r(n),t.d(n,{assets:()=>d,contentTitle:()=>r,default:()=>h,frontMatter:()=>c,metadata:()=>a,toc:()=>l});const a=JSON.parse('{"id":"technical/osmand-file-formats/osmand-voice-package","title":"Voice packages","description":"voice-packages}","source":"@site/docs/technical/osmand-file-formats/osmand-voice-package.mdx","sourceDirName":"technical/osmand-file-formats","slug":"/technical/osmand-file-formats/osmand-voice-package","permalink":"/docs/technical/osmand-file-formats/osmand-voice-package","draft":false,"unlisted":false,"editUrl":"https://github.com/osmandapp/web/edit/main/main/docs/technical/osmand-file-formats/osmand-voice-package.mdx","tags":[],"version":"current","sidebarPosition":10,"frontMatter":{"sidebar_position":10},"sidebar":"tutorialSidebar","previous":{"title":"Tiles SQLite Format - .sqlite","permalink":"/docs/technical/osmand-file-formats/osmand-sqlite"},"next":{"title":"Map Creation","permalink":"/docs/technical/map-creation/"}}');var i=t(474848),s=t(28453),o=t(405354);const c={sidebar_position:10},r="Voice packages {#voice-packages}",d={},l=[...o.RM,{value:"Difference between TTS and Recorded packages",id:"difference-between-tts-and-recorded-packages",level:3},{value:"Package Structure",id:"package-structure",level:3},{value:"Generation custom package",id:"generation-custom-package",level:3},{value:"Testing voice package (Android)",id:"testing-voice-package-android",level:3}];function p(e){const n={a:"a",code:"code",h1:"h1",h3:"h3",header:"header",li:"li",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,s.R)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(n.header,{children:(0,i.jsx)(n.h1,{id:"voice-packages",children:"Voice packages"})}),"\n",(0,i.jsx)(o.Ay,{}),"\n",(0,i.jsx)(n.p,{children:"OsmAnd supports two types of voice packages:"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.strong,{children:"Text-To-Speech"})," (",(0,i.jsx)(n.a,{href:"https://developer.android.com/reference/android/speech/tts/TextToSpeech",children:"https://developer.android.com/reference/android/speech/tts/TextToSpeech"}),") available on App Stores or preinstalled"]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.strong,{children:"Recorded Voice packages"})," , which include recorded voices."]}),"\n"]}),"\n",(0,i.jsxs)(n.p,{children:["If you could not find the voice package you need, please follow the following examples and create your own voice package. Examples - ",(0,i.jsx)(n.a,{href:"https://github.com/osmandapp/OsmAnd-resources/tree/master/voice",children:"https://github.com/osmandapp/OsmAnd-resources/tree/master/voice"}),", German package ",(0,i.jsx)(n.a,{href:"https://download.osmand.net/download?standard=yes&file=de_0.voice.zip",children:"de_0.voice.zip"}),", English package ",(0,i.jsx)(n.a,{href:"https://download.osmand.net/download?standard=yes&file=en_0.voice.zip",children:"en_0.voice.zip"}),"."]}),"\n",(0,i.jsx)(n.h3,{id:"difference-between-tts-and-recorded-packages",children:"Difference between TTS and Recorded packages"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:"a Text-To-Speech engine supports Street Name, Refs, POI names pronouncation"}),"\n",(0,i.jsx)(n.li,{children:"all Text-To-Speech supported packages bundled and updated with an application"}),"\n",(0,i.jsx)(n.li,{children:"a Recorded Package needs to be installed and updated manually (although the configuration file could be updated with app update)"}),"\n",(0,i.jsx)(n.li,{children:"a Recorded Package may not support some correct forms, and support is limited"}),"\n",(0,i.jsx)(n.li,{children:"a Recorded Package does not require any proprietary TTS engine to be installed"}),"\n"]}),"\n",(0,i.jsx)(n.h3,{id:"package-structure",children:"Package Structure"}),"\n",(0,i.jsxs)(n.p,{children:["Voice package usually is distributed as .voice.zip, where the zip contains one folder with ",(0,i.jsx)(n.a,{href:"https://github.com/osmandapp/OsmAnd-resources/blob/master/voice/de/de_tts.js",children:"lang_tts.js"})," (main ",(0,i.jsx)(n.strong,{children:"configuration"})," file), and sound files if they are present."]}),"\n",(0,i.jsx)(n.p,{children:"The configuration files are written in JavaScript language. All configuration files are by default TTS-packages, even if there is no TTS present yet to supp
1ort the language. And later the configuration is extended by mapping 'dictionary phrases' to 'recorded file names'."}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{children:'function populateDictionary(tts) {\n\t// ROUTE CALCULATED\n\tdictionary["route_is1"] = tts ? "Die berechnete Strecke ist" : "route_is1.ogg";\n\tdictionary["route_is2"] = tts ? "lang" : "route_is2.ogg";\n\tdictionary["route_calculate"] = tts ? "Route neu berechnet" : "route_calculate.ogg";\n\tdictionary["distance"] = tts ? "die Entfernung betr\xe4gt" : "distance.ogg";\n\n\t// LEFT/RIGHT\n\tdictionary["prepare"] = tts ? "Demn\xe4chst " : "prepare.ogg";  // Demn\xe4chst sounds better then Vorbereiten zum\n\tdictionary["after"] = tts ? "nach" : "after.ogg";\n\t\n\tdictionary["left"] = tts ? "links abbiegen" : "left.ogg";\n  .....\n}\n\nfunction route_recalc(dist, seconds) {\n\treturn dictionary["route_calculate"] + (tts ? ", " : " ") + distance(dist, "nominativ") + (tts ? ", " : " ") + dictionary["time"] + " " + time(seconds) + (tts ? ". " : " ");\n}\n'})}),"\n",(0,i.jsx)(n.h3,{id:"generation-custom-package",children:"Generation custom package"}),"\n",(0,i.jsxs)(n.p,{children:["Please check the ",(0,i.jsx)(n.a,{href:"https://github.com/osmandapp/OsmAnd-resources/",children:"project resources"})," and use the same folder structure as the ",(0,i.jsx)(n.a,{href:"https://github.com/osmandapp/OsmAnd-resources/tree/master/voice/de",children:"German package"})," - simply make copy. Once it's done you can change, run the ",(0,i.jsx)(n.a,{href:"https://github.com/osmandapp/OsmAnd-resources/blob/master/voice/gen_voice.sh#L4",children:"generation script"})," and specify the required arguments. Help is inside the script."]}),"\n",(0,i.jsx)(n.h3,{id:"testing-voice-package-android",children:"Testing voice package (Android)"}),"\n",(0,i.jsx)(n.p,{children:"For testing, you can use:"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:"navigation;"}),"\n",(0,i.jsx)(n.li,{children:"navigation simulation;"}),"\n",(0,i.jsxs)(n.li,{children:["or a convenient version of the ",(0,i.jsx)(n.a,{href:"/docs/user/navigation/guidance/voice-navigation#testing-of-voice-prompts",children:"OsmAnd development plugin"}),", which simulates different voice commands for testing."]}),"\n"]})]})}function h(e={}){const{wrapper:n}={...(0,s.R)(),...e.components};return n?(0,i.jsx)(n,{...e,children:(0,i.jsx)(p,{...e})}):p(e)}}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.